The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Kazlauskas, Nicholas" <nicholas.kazlauskas@amd.com>
To: "Liu, Zhan" <Zhan.Liu@amd.com>, Arnd Bergmann <arnd@arndb.de>,
	"Wentland, Harry" <Harry.Wentland@amd.com>,
	"Li, Sun peng (Leo)" <Sunpeng.Li@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"Zhou, David(ChunMing)" <David1.Zhou@amd.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: "Liu, Charlene" <Charlene.Liu@amd.com>,
	"Yang, Eric" <Eric.Yang2@amd.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Cornij, Nikola" <Nikola.Cornij@amd.com>,
	"Laktyushkin, Dmytro" <Dmytro.Laktyushkin@amd.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>, "Lei, Jun" <Jun.Lei@amd.com>,
	"Lakha, Bhawanpreet" <Bhawanpreet.Lakha@amd.com>
Subject: Re: [PATCH] drm/amd/display: fix undefined struct member reference
Date: Tue, 10 Dec 2019 15:55:56 -0500	[thread overview]
Message-ID: <b552de20-dca5-b5d1-e5e8-4c09bc3fdcb5@amd.com> (raw)
In-Reply-To: <DM6PR12MB34665D3A13E23D8AA7E2E7919E5B0@DM6PR12MB3466.namprd12.prod.outlook.com>

On 2019-12-10 3:54 p.m., Liu, Zhan wrote:
> 
> 
>> -----Original Message-----
>> From: Arnd Bergmann <arnd@arndb.de>
>> Sent: 2019/December/10, Tuesday 3:31 PM
>> To: Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo)
>> <Sunpeng.Li@amd.com>; Deucher, Alexander
>> <Alexander.Deucher@amd.com>; Koenig, Christian
>> <Christian.Koenig@amd.com>; Zhou, David(ChunMing)
>> <David1.Zhou@amd.com>; David Airlie <airlied@linux.ie>; Daniel Vetter
>> <daniel@ffwll.ch>; Liu, Zhan <Zhan.Liu@amd.com>
>> Cc: Arnd Bergmann <arnd@arndb.de>; Laktyushkin, Dmytro
>> <Dmytro.Laktyushkin@amd.com>; Lakha, Bhawanpreet
>> <Bhawanpreet.Lakha@amd.com>; Lei, Jun <Jun.Lei@amd.com>; Liu,
>> Charlene <Charlene.Liu@amd.com>; Yang, Eric <Eric.Yang2@amd.com>;
>> Cornij, Nikola <Nikola.Cornij@amd.com>; amd-gfx@lists.freedesktop.org;
>> dri-devel@lists.freedesktop.org; linux-kernel@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@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@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.

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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 


  reply	other threads:[~2019-12-10 20:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 20:30 [PATCH] drm/amd/display: fix undefined struct member reference Arnd Bergmann
2019-12-10 20:54 ` Liu, Zhan
2019-12-10 20:55   ` Kazlauskas, Nicholas [this message]
2019-12-10 21:39     ` Arnd Bergmann
2019-12-10 21:43     ` Deucher, Alexander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b552de20-dca5-b5d1-e5e8-4c09bc3fdcb5@amd.com \
    --to=nicholas.kazlauskas@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Charlene.Liu@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=David1.Zhou@amd.com \
    --cc=Dmytro.Laktyushkin@amd.com \
    --cc=Eric.Yang2@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Jun.Lei@amd.com \
    --cc=Nikola.Cornij@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=Zhan.Liu@amd.com \
    --cc=airlied@linux.ie \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=arnd@arndb.de \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox