All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: fix undefined struct member reference
@ 2019-12-10 20:30 ` Arnd Bergmann
  0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2019-12-10 20:30 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	David (ChunMing) Zhou, David Airlie, Daniel Vetter, Zhan Liu
  Cc: Arnd Bergmann, Dmytro Laktyushkin, Bhawanpreet Lakha, Jun Lei,
	Charlene Liu, Eric Yang, Nikola Cornij, amd-gfx, dri-devel,
	linux-kernel

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:14: 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>
---
 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


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH] drm/amd/display: fix undefined struct member reference
@ 2019-12-10 20:30 ` Arnd Bergmann
  0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2019-12-10 20:30 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	David (ChunMing) Zhou, David Airlie, Daniel Vetter, Zhan Liu
  Cc: Charlene Liu, Eric Yang, Arnd Bergmann, linux-kernel, amd-gfx,
	Nikola Cornij, Dmytro Laktyushkin, dri-devel, Jun Lei,
	Bhawanpreet Lakha

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:14: 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>
---
 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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH] drm/amd/display: fix undefined struct member reference
@ 2019-12-10 20:30 ` Arnd Bergmann
  0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2019-12-10 20:30 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	David (ChunMing) Zhou, David Airlie, Daniel Vetter, Zhan Liu
  Cc: Charlene Liu, Eric Yang, Arnd Bergmann, linux-kernel, amd-gfx,
	Nikola Cornij, Dmytro Laktyushkin, dri-devel, Jun Lei,
	Bhawanpreet Lakha

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:14: 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>
---
 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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* RE: [PATCH] drm/amd/display: fix undefined struct member reference
  2019-12-10 20:30 ` Arnd Bergmann
  (?)
@ 2019-12-10 20:54   ` Liu, Zhan
  -1 siblings, 0 replies; 15+ messages in thread
From: Liu, Zhan @ 2019-12-10 20:54 UTC (permalink / raw)
  To: Arnd Bergmann, Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Daniel Vetter
  Cc: Laktyushkin, Dmytro, Lakha, Bhawanpreet, Lei, Jun, Liu, Charlene,
	Yang, Eric, Cornij, Nikola, amd-gfx, dri-devel, linux-kernel



> -----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>

> ---
>  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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH] drm/amd/display: fix undefined struct member reference
@ 2019-12-10 20:54   ` Liu, Zhan
  0 siblings, 0 replies; 15+ messages in thread
From: Liu, Zhan @ 2019-12-10 20:54 UTC (permalink / raw)
  To: Arnd Bergmann, Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Daniel Vetter
  Cc: Liu, Charlene, Yang, Eric, linux-kernel, amd-gfx, Cornij, Nikola,
	Laktyushkin, Dmytro, dri-devel, Lei, Jun, Lakha, Bhawanpreet



> -----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>

> ---
>  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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH] drm/amd/display: fix undefined struct member reference
@ 2019-12-10 20:54   ` Liu, Zhan
  0 siblings, 0 replies; 15+ messages in thread
From: Liu, Zhan @ 2019-12-10 20:54 UTC (permalink / raw)
  To: Arnd Bergmann, Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Daniel Vetter
  Cc: Liu, Charlene, Yang, Eric, linux-kernel, amd-gfx, Cornij, Nikola,
	Laktyushkin, Dmytro, dri-devel, Lei, Jun, Lakha, Bhawanpreet



> -----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>

> ---
>  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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/amd/display: fix undefined struct member reference
  2019-12-10 20:54   ` Liu, Zhan
  (?)
@ 2019-12-10 20:55     ` Kazlauskas, Nicholas
  -1 siblings, 0 replies; 15+ messages in thread
From: Kazlauskas, Nicholas @ 2019-12-10 20:55 UTC (permalink / raw)
  To: Liu, Zhan, Arnd Bergmann, Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Daniel Vetter
  Cc: Liu, Charlene, Yang, Eric, linux-kernel, amd-gfx, Cornij, Nikola,
	Laktyushkin, Dmytro, dri-devel, Lei, Jun, Lakha, Bhawanpreet

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
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/amd/display: fix undefined struct member reference
@ 2019-12-10 20:55     ` Kazlauskas, Nicholas
  0 siblings, 0 replies; 15+ messages in thread
From: Kazlauskas, Nicholas @ 2019-12-10 20:55 UTC (permalink / raw)
  To: Liu, Zhan, Arnd Bergmann, Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Daniel Vetter
  Cc: Liu, Charlene, Yang, Eric, linux-kernel, amd-gfx, Cornij, Nikola,
	Laktyushkin, Dmytro, dri-devel, Lei, Jun, Lakha, Bhawanpreet

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
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/amd/display: fix undefined struct member reference
@ 2019-12-10 20:55     ` Kazlauskas, Nicholas
  0 siblings, 0 replies; 15+ messages in thread
From: Kazlauskas, Nicholas @ 2019-12-10 20:55 UTC (permalink / raw)
  To: Liu, Zhan, Arnd Bergmann, Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Daniel Vetter
  Cc: Liu, Charlene, Yang, Eric, linux-kernel, amd-gfx, Cornij, Nikola,
	Laktyushkin, Dmytro, dri-devel, Lei, Jun, Lakha, Bhawanpreet

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
> 

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/amd/display: fix undefined struct member reference
  2019-12-10 20:55     ` Kazlauskas, Nicholas
  (?)
@ 2019-12-10 21:39       ` Arnd Bergmann
  -1 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2019-12-10 21:39 UTC (permalink / raw)
  To: Kazlauskas, Nicholas
  Cc: Liu, Zhan, Wentland, Harry, Li, Sun peng (Leo),
	Deucher, Alexander, Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Daniel Vetter, Liu, Charlene, Yang, Eric,
	linux-kernel, amd-gfx, Cornij, Nikola, Laktyushkin, Dmytro,
	dri-devel, Lei, Jun, Lakha, Bhawanpreet

On Tue, Dec 10, 2019 at 9:56 PM Kazlauskas, Nicholas
<nicholas.kazlauskas@amd.com> wrote:
> On 2019-12-10 3:54 p.m., Liu, Zhan wrote:

> >>
> >> 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?

This is plain linux-5.5-rc1.

> 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.

Fair enough, please revert c3d03c5a196f ("drm/amd/display: Include
num_vmid and num_dsc within NV14's resource caps") for 5.5-rc2 then.

      Arnd

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/amd/display: fix undefined struct member reference
@ 2019-12-10 21:39       ` Arnd Bergmann
  0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2019-12-10 21:39 UTC (permalink / raw)
  To: Kazlauskas, Nicholas
  Cc: Yang, Eric, Liu, Charlene, Li, Sun peng (Leo),
	Lakha, Bhawanpreet, Liu, Zhan, linux-kernel, amd-gfx, Cornij,
	Nikola, David Airlie, Laktyushkin, Dmytro, dri-devel, Deucher,
	Alexander, Lei, Jun, Koenig, Christian

On Tue, Dec 10, 2019 at 9:56 PM Kazlauskas, Nicholas
<nicholas.kazlauskas@amd.com> wrote:
> On 2019-12-10 3:54 p.m., Liu, Zhan wrote:

> >>
> >> 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?

This is plain linux-5.5-rc1.

> 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.

Fair enough, please revert c3d03c5a196f ("drm/amd/display: Include
num_vmid and num_dsc within NV14's resource caps") for 5.5-rc2 then.

      Arnd
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/amd/display: fix undefined struct member reference
@ 2019-12-10 21:39       ` Arnd Bergmann
  0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2019-12-10 21:39 UTC (permalink / raw)
  To: Kazlauskas, Nicholas
  Cc: Zhou, David(ChunMing),
	Yang, Eric, Liu, Charlene, Li, Sun peng (Leo),
	Lakha, Bhawanpreet, Liu, Zhan, linux-kernel, amd-gfx, Cornij,
	Nikola, David Airlie, Laktyushkin, Dmytro, dri-devel,
	Daniel Vetter, Deucher, Alexander, Lei, Jun, Wentland, Harry,
	Koenig, Christian

On Tue, Dec 10, 2019 at 9:56 PM Kazlauskas, Nicholas
<nicholas.kazlauskas@amd.com> wrote:
> On 2019-12-10 3:54 p.m., Liu, Zhan wrote:

> >>
> >> 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?

This is plain linux-5.5-rc1.

> 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.

Fair enough, please revert c3d03c5a196f ("drm/amd/display: Include
num_vmid and num_dsc within NV14's resource caps") for 5.5-rc2 then.

      Arnd
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH] drm/amd/display: fix undefined struct member reference
  2019-12-10 20:55     ` Kazlauskas, Nicholas
  (?)
@ 2019-12-10 21:43       ` Deucher, Alexander
  -1 siblings, 0 replies; 15+ messages in thread
From: Deucher, Alexander @ 2019-12-10 21:43 UTC (permalink / raw)
  To: Kazlauskas, Nicholas, Liu, Zhan, Arnd Bergmann, Wentland, Harry,
	Li, Sun peng (Leo), Koenig, Christian, Zhou, David(ChunMing),
	David Airlie, Daniel Vetter
  Cc: Liu, Charlene, Yang, Eric, linux-kernel, amd-gfx, Cornij, Nikola,
	Laktyushkin, Dmytro, dri-devel, Lei, Jun, Lakha, Bhawanpreet

> -----Original Message-----
> From: Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>
> Sent: Tuesday, December 10, 2019 3:56 PM
> 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; amd-
> gfx@lists.freedesktop.org; Cornij, Nikola <Nikola.Cornij@amd.com>;
> Laktyushkin, Dmytro <Dmytro.Laktyushkin@amd.com>; 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
> 
> 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.
> 

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH] drm/amd/display: fix undefined struct member reference
@ 2019-12-10 21:43       ` Deucher, Alexander
  0 siblings, 0 replies; 15+ messages in thread
From: Deucher, Alexander @ 2019-12-10 21:43 UTC (permalink / raw)
  To: Kazlauskas, Nicholas, Liu, Zhan, Arnd Bergmann, Wentland, Harry,
	Li, Sun peng (Leo), Koenig,  Christian, Zhou, David(ChunMing),
	David Airlie, Daniel Vetter
  Cc: Liu, Charlene, Yang, Eric, linux-kernel, amd-gfx, Cornij,
	 Nikola, Laktyushkin, Dmytro, dri-devel, Lei, Jun, Lakha,
	Bhawanpreet

> -----Original Message-----
> From: Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>
> Sent: Tuesday, December 10, 2019 3:56 PM
> 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; amd-
> gfx@lists.freedesktop.org; Cornij, Nikola <Nikola.Cornij@amd.com>;
> Laktyushkin, Dmytro <Dmytro.Laktyushkin@amd.com>; 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
> 
> 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.
> 

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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH] drm/amd/display: fix undefined struct member reference
@ 2019-12-10 21:43       ` Deucher, Alexander
  0 siblings, 0 replies; 15+ messages in thread
From: Deucher, Alexander @ 2019-12-10 21:43 UTC (permalink / raw)
  To: Kazlauskas, Nicholas, Liu, Zhan, Arnd Bergmann, Wentland, Harry,
	Li, Sun peng (Leo), Koenig,  Christian, Zhou, David(ChunMing),
	David Airlie, Daniel Vetter
  Cc: Liu, Charlene, Yang, Eric, linux-kernel, amd-gfx, Cornij,
	 Nikola, Laktyushkin, Dmytro, dri-devel, Lei, Jun, Lakha,
	Bhawanpreet

> -----Original Message-----
> From: Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>
> Sent: Tuesday, December 10, 2019 3:56 PM
> 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; amd-
> gfx@lists.freedesktop.org; Cornij, Nikola <Nikola.Cornij@amd.com>;
> Laktyushkin, Dmytro <Dmytro.Laktyushkin@amd.com>; 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
> 
> 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.
> 

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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-12-10 21:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 20:30 [PATCH] drm/amd/display: fix undefined struct member reference Arnd Bergmann
2019-12-10 20:30 ` Arnd Bergmann
2019-12-10 20:30 ` Arnd Bergmann
2019-12-10 20:54 ` Liu, Zhan
2019-12-10 20:54   ` Liu, Zhan
2019-12-10 20:54   ` Liu, Zhan
2019-12-10 20:55   ` Kazlauskas, Nicholas
2019-12-10 20:55     ` Kazlauskas, Nicholas
2019-12-10 20:55     ` Kazlauskas, Nicholas
2019-12-10 21:39     ` Arnd Bergmann
2019-12-10 21:39       ` Arnd Bergmann
2019-12-10 21:39       ` Arnd Bergmann
2019-12-10 21:43     ` Deucher, Alexander
2019-12-10 21:43       ` Deucher, Alexander
2019-12-10 21:43       ` Deucher, Alexander

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.