[PATCH] drm/amd/display: fix undefined struct member reference

Deucher, Alexander Alexander.Deucher at amd.com
Tue Dec 10 21:43:15 UTC 2019


> -----Original Message-----
> From: Kazlauskas, Nicholas <Nicholas.Kazlauskas at amd.com>
> Sent: Tuesday, December 10, 2019 3:56 PM
> To: Liu, Zhan <Zhan.Liu at amd.com>; Arnd Bergmann <arnd at arndb.de>;
> Wentland, Harry <Harry.Wentland at amd.com>; Li, Sun peng (Leo)
> <Sunpeng.Li at amd.com>; Deucher, Alexander
> <Alexander.Deucher at amd.com>; Koenig, Christian
> <Christian.Koenig at amd.com>; Zhou, David(ChunMing)
> <David1.Zhou at amd.com>; David Airlie <airlied at linux.ie>; Daniel Vetter
> <daniel at ffwll.ch>
> Cc: Liu, Charlene <Charlene.Liu at amd.com>; Yang, Eric
> <Eric.Yang2 at amd.com>; linux-kernel at vger.kernel.org; amd-
> gfx at lists.freedesktop.org; Cornij, Nikola <Nikola.Cornij at amd.com>;
> Laktyushkin, Dmytro <Dmytro.Laktyushkin at amd.com>; dri-
> devel at lists.freedesktop.org; Lei, Jun <Jun.Lei at amd.com>; Lakha,
> Bhawanpreet <Bhawanpreet.Lakha at amd.com>
> Subject: Re: [PATCH] drm/amd/display: fix undefined struct member
> reference
> 
> On 2019-12-10 3:54 p.m., Liu, Zhan wrote:
> >
> >
> >> -----Original Message-----
> >> From: Arnd Bergmann <arnd at arndb.de>
> >> Sent: 2019/December/10, Tuesday 3:31 PM
> >> To: Wentland, Harry <Harry.Wentland at amd.com>; Li, Sun peng (Leo)
> >> <Sunpeng.Li at amd.com>; Deucher, Alexander
> <Alexander.Deucher at amd.com>;
> >> Koenig, Christian <Christian.Koenig at amd.com>; Zhou, David(ChunMing)
> >> <David1.Zhou at amd.com>; David Airlie <airlied at linux.ie>; Daniel Vetter
> >> <daniel at ffwll.ch>; Liu, Zhan <Zhan.Liu at amd.com>
> >> Cc: Arnd Bergmann <arnd at arndb.de>; Laktyushkin, Dmytro
> >> <Dmytro.Laktyushkin at amd.com>; Lakha, Bhawanpreet
> >> <Bhawanpreet.Lakha at amd.com>; Lei, Jun <Jun.Lei at amd.com>; Liu,
> >> Charlene <Charlene.Liu at amd.com>; Yang, Eric <Eric.Yang2 at amd.com>;
> >> Cornij, Nikola <Nikola.Cornij at amd.com>;
> >> amd-gfx at lists.freedesktop.org; dri-devel at lists.freedesktop.org;
> >> linux-kernel at vger.kernel.org
> >> Subject: [PATCH] drm/amd/display: fix undefined struct member
> >> reference
> >>
> >> An initialization was added for two optional struct members.  One of
> >> these is always present in the dcn20_resource file, but the other one
> >> depends on CONFIG_DRM_AMD_DC_DSC_SUPPORT and causes a build
> failure
> >> if that is
> >> missing:
> >>
> >>
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:926:1
> >> 4: error: excess elements in struct initializer [-Werror]
> >>     .num_dsc = 5,
> >>
> >> Add another #ifdef around the assignment.
> >>
> >> Fixes: c3d03c5a196f ("drm/amd/display: Include num_vmid and num_dsc
> >> within NV14's resource caps")
> >> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
> >
> > Thank you for catching that 😊 On my side I kept that flag enabled all the
> time, so I didn't realize there was a warning hidden here.
> >
> > Reviewed-by: Zhan Liu <zhan.liu at amd.com>
> 
> What tree is this reported on?
> 
> We dropped this flag whenever building DCN. Sounds like we're missing a
> patch if you're getting this.
> 
> So this is a NAK from me for going into amd-staging-drm-next at least.
> 

Those patches are not upstream yet.  They are queued for 5.6.  So we need this patch for 5.5.  I'll apply it.

Alex

> Nicholas Kazlauskas
> 
> >
> >> ---
> >>   drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 ++
> >>   1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> >> b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> >> index faab89d1e694..fdf93e6edf43 100644
> >> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> >> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> >> @@ -923,7 +923,9 @@ static const struct resource_caps res_cap_nv14 = {
> >>   		.num_dwb = 1,
> >>   		.num_ddc = 5,
> >>   		.num_vmid = 16,
> >> +#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
> >>   		.num_dsc = 5,
> >> +#endif
> >>   };
> >>
> >>   static const struct dc_debug_options debug_defaults_drv = {
> >> --
> >> 2.20.0
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >



More information about the amd-gfx mailing list