diff mbox series

[RESEND,16/26] drm/amd/display/dc/dce/dce_transform: Remove superfluous re-initialisation of DCFE_MEM_LIGHT_SLEEP_CNTL,

Message ID 20210602143300.2330146-17-lee.jones@linaro.org
State New
Headers show
Series Rid W=1 warnings from GPU | expand

Commit Message

Lee Jones June 2, 2021, 2:32 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c:374:22: warning: no previous prototype for ‘mod_hdcp_hdcp1_get_link_encryption_status’
 In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:28:
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: warning: initialized field overwritten [-Woverride-init]
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in expansion of macro ‘SRI’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: in expansion of macro ‘transform_regs’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: note: (near initialization for ‘xfm_regs[0].DCFE_MEM_LIGHT_SLEEP_CNTL’)
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in expansion of macro ‘SRI’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: in expansion of macro ‘transform_regs’
 drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:645:43: warning: initialized field overwritten [-Woverride-init]

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Mauro Rossi <issor.oruam@gmail.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.31.1

Comments

Harry Wentland June 2, 2021, 2:46 p.m. UTC | #1
On 2021-06-02 10:32 a.m., Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):

> 

>  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c:374:22: warning: no previous prototype for ‘mod_hdcp_hdcp1_get_link_encryption_status’

>  In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:28:

>  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: warning: initialized field overwritten [-Woverride-init]

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in expansion of macro ‘SRI’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: in expansion of macro ‘transform_regs’

>  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: note: (near initialization for ‘xfm_regs[0].DCFE_MEM_LIGHT_SLEEP_CNTL’)

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in expansion of macro ‘SRI’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: in expansion of macro ‘transform_regs’

>  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:645:43: warning: initialized field overwritten [-Woverride-init]

> 

> Cc: Harry Wentland <harry.wentland@amd.com>

> Cc: Leo Li <sunpeng.li@amd.com>

> Cc: Alex Deucher <alexander.deucher@amd.com>

> Cc: "Christian König" <christian.koenig@amd.com>

> Cc: David Airlie <airlied@linux.ie>

> Cc: Daniel Vetter <daniel@ffwll.ch>

> Cc: Mauro Rossi <issor.oruam@gmail.com>

> Cc: amd-gfx@lists.freedesktop.org

> Cc: dri-devel@lists.freedesktop.org

> Signed-off-by: Lee Jones <lee.jones@linaro.org>


Thanks for the fix.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>


Harry

> ---

>  drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 3 +--

>  1 file changed, 1 insertion(+), 2 deletions(-)

> 

> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h

> index cbce194ec7b82..e98b5d4141739 100644

> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h

> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h

> @@ -166,8 +166,7 @@

>  	SRI(SCL_F_SHARP_CONTROL, SCL, id)

>  

>  #define XFM_COMMON_REG_LIST_DCE60(id) \

> -	XFM_COMMON_REG_LIST_DCE60_BASE(id), \

> -	SRI(DCFE_MEM_LIGHT_SLEEP_CNTL, CRTC, id)

> +	XFM_COMMON_REG_LIST_DCE60_BASE(id)

>  #endif

>  

>  #define XFM_SF(reg_name, field_name, post_fix)\

>
Alex Deucher June 2, 2021, 4:23 p.m. UTC | #2
On Wed, Jun 2, 2021 at 10:33 AM Lee Jones <lee.jones@linaro.org> wrote:
>

> Fixes the following W=1 kernel build warning(s):

>

>  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c:374:22: warning: no previous prototype for ‘mod_hdcp_hdcp1_get_link_encryption_status’

>  In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:28:

>  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: warning: initialized field overwritten [-Woverride-init]

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in expansion of macro ‘SRI’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: in expansion of macro ‘transform_regs’

>  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: note: (near initialization for ‘xfm_regs[0].DCFE_MEM_LIGHT_SLEEP_CNTL’)

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in expansion of macro ‘SRI’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’

>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: in expansion of macro ‘transform_regs’

>  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:645:43: warning: initialized field overwritten [-Woverride-init]

>

> Cc: Harry Wentland <harry.wentland@amd.com>

> Cc: Leo Li <sunpeng.li@amd.com>

> Cc: Alex Deucher <alexander.deucher@amd.com>

> Cc: "Christian König" <christian.koenig@amd.com>

> Cc: David Airlie <airlied@linux.ie>

> Cc: Daniel Vetter <daniel@ffwll.ch>

> Cc: Mauro Rossi <issor.oruam@gmail.com>

> Cc: amd-gfx@lists.freedesktop.org

> Cc: dri-devel@lists.freedesktop.org

> Signed-off-by: Lee Jones <lee.jones@linaro.org>

> ---

>  drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 3 +--

>  1 file changed, 1 insertion(+), 2 deletions(-)

>

> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h

> index cbce194ec7b82..e98b5d4141739 100644

> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h

> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h

> @@ -166,8 +166,7 @@

>         SRI(SCL_F_SHARP_CONTROL, SCL, id)

>

>  #define XFM_COMMON_REG_LIST_DCE60(id) \

> -       XFM_COMMON_REG_LIST_DCE60_BASE(id), \

> -       SRI(DCFE_MEM_LIGHT_SLEEP_CNTL, CRTC, id)

> +       XFM_COMMON_REG_LIST_DCE60_BASE(id)


I believe DCFE_MEM_LIGHT_SLEEP_CNTL should be kept here and it should
be removed from
XFM_COMMON_REG_LIST_DCE60_BASE() to align with other asics.

Alex

>  #endif

>

>  #define XFM_SF(reg_name, field_name, post_fix)\

> --

> 2.31.1

>
Lee Jones June 2, 2021, 5:37 p.m. UTC | #3
On Wed, 02 Jun 2021, Alex Deucher wrote:

> On Wed, Jun 2, 2021 at 10:33 AM Lee Jones <lee.jones@linaro.org> wrote:

> >

> > Fixes the following W=1 kernel build warning(s):

> >

> >  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c:374:22: warning: no previous prototype for ‘mod_hdcp_hdcp1_get_link_encryption_status’

> >  In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:28:

> >  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: warning: initialized field overwritten [-Woverride-init]

> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’

> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in expansion of macro ‘SRI’

> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’

> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: in expansion of macro ‘transform_regs’

> >  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:568:43: note: (near initialization for ‘xfm_regs[0].DCFE_MEM_LIGHT_SLEEP_CNTL’)

> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:14: note: in expansion of macro ‘mmCRTC0_DCFE_MEM_LIGHT_SLEEP_CNTL’

> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:2: note: in expansion of macro ‘SRI’

> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:3: note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’

> >  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:187:3: note: in expansion of macro ‘transform_regs’

> >  drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:645:43: warning: initialized field overwritten [-Woverride-init]

> >

> > Cc: Harry Wentland <harry.wentland@amd.com>

> > Cc: Leo Li <sunpeng.li@amd.com>

> > Cc: Alex Deucher <alexander.deucher@amd.com>

> > Cc: "Christian König" <christian.koenig@amd.com>

> > Cc: David Airlie <airlied@linux.ie>

> > Cc: Daniel Vetter <daniel@ffwll.ch>

> > Cc: Mauro Rossi <issor.oruam@gmail.com>

> > Cc: amd-gfx@lists.freedesktop.org

> > Cc: dri-devel@lists.freedesktop.org

> > Signed-off-by: Lee Jones <lee.jones@linaro.org>

> > ---

> >  drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 3 +--

> >  1 file changed, 1 insertion(+), 2 deletions(-)

> >

> > diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h

> > index cbce194ec7b82..e98b5d4141739 100644

> > --- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h

> > +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h

> > @@ -166,8 +166,7 @@

> >         SRI(SCL_F_SHARP_CONTROL, SCL, id)

> >

> >  #define XFM_COMMON_REG_LIST_DCE60(id) \

> > -       XFM_COMMON_REG_LIST_DCE60_BASE(id), \

> > -       SRI(DCFE_MEM_LIGHT_SLEEP_CNTL, CRTC, id)

> > +       XFM_COMMON_REG_LIST_DCE60_BASE(id)

> 

> I believe DCFE_MEM_LIGHT_SLEEP_CNTL should be kept here and it should

> be removed from

> XFM_COMMON_REG_LIST_DCE60_BASE() to align with other asics.


Ack.  Sorry for missing this.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
index cbce194ec7b82..e98b5d4141739 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
@@ -166,8 +166,7 @@ 
 	SRI(SCL_F_SHARP_CONTROL, SCL, id)
 
 #define XFM_COMMON_REG_LIST_DCE60(id) \
-	XFM_COMMON_REG_LIST_DCE60_BASE(id), \
-	SRI(DCFE_MEM_LIGHT_SLEEP_CNTL, CRTC, id)
+	XFM_COMMON_REG_LIST_DCE60_BASE(id)
 #endif
 
 #define XFM_SF(reg_name, field_name, post_fix)\