Skip to contentSkip to conversation

drm/amd/display: fix undefined struct member reference

PATCH In review Arnd Bergmann 4 participants 5 messages Dec 10, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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: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")
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +2 -0
index faab89d1e694..fdf93e6edf43 100644
@@ -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 = {
Signature · 1 line
2.20.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 28 lines

-----Original Message-----
From: Arnd Bergmann <[email protected]>
Sent: 2019/December/10, Tuesday 3:31 PM
To: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Zhou, David(ChunMing) <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>; Liu, Zhan <[email protected]>
Cc: Arnd Bergmann <[email protected]>; Laktyushkin, Dmytro <[email protected]>; Lakha, Bhawanpreet <[email protected]>; Lei, Jun <[email protected]>; Liu, Charlene <[email protected]>; Yang, Eric <[email protected]>; Cornij, Nikola <[email protected]>; [email protected]; [email protected]; [email protected]
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,

Quoted 5 lines

Add another #ifdef around the assignment.

Fixes c3d03c5a196f ("drm/amd/display: Include num_vmid and num_dsc

within NV14's resource caps")

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.

Quoted 20 lines
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +2 -1
index faab89d1e694..fdf93e6edf43 100644
@@ -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 = {
--
Quoted 1 line

2.20.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#2 lore raw
Quoted 30 lines · Zhan
Quoted 30 lines

-----Original Message-----
From: Arnd Bergmann <[email protected]>
Sent: 2019/December/10, Tuesday 3:31 PM
To: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Zhou, David(ChunMing) <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>; Liu, Zhan <[email protected]>
Cc: Arnd Bergmann <[email protected]>; Laktyushkin, Dmytro <[email protected]>; Lakha, Bhawanpreet <[email protected]>; Lei, Jun <[email protected]>; Liu, Charlene <[email protected]>; Yang, Eric <[email protected]>; Cornij, Nikola <[email protected]>; [email protected]; [email protected]; [email protected]
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.

Quoted 7 lines
Quoted 3 lines
Fixes c3d03c5a196f ("drm/amd/display: Include num_vmid and num_dsc

within NV14's resource caps")

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.

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

Quoted 19 lines
Quoted 19 lines
---
  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +2 -0
index faab89d1e694..fdf93e6edf43 100644
@@ -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
  };
 
Quoted 9 lines
Quoted 3 lines
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +0 -1
  static const struct dc_debug_options debug_defaults_drv = {
--

2.20.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
Quoted 7 lines · Nicholas
Quoted 5 lines · Zhan
Quoted 4 lines
Fixes c3d03c5a196f ("drm/amd/display: Include num_vmid and num_dsc

within NV14's resource caps")

Quoted 5 lines
Quoted 3 lines

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.

What tree is this reported on?

This is plain linux-5.5-rc1.

Quoted 4 lines

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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to Kazlauskas, Nicholas
Quoted 62 lines

-----Original Message-----
From: Kazlauskas, Nicholas <[email protected]>
Sent: Tuesday, December 10, 2019 3:56 PM
To: Liu, Zhan <[email protected]>; Arnd Bergmann <[email protected]>; Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Zhou, David(ChunMing) <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>
Cc: Liu, Charlene <[email protected]>; Yang, Eric <[email protected]>; [email protected]; amd- [email protected]; Cornij, Nikola <[email protected]>; Laktyushkin, Dmytro <[email protected]>; dri- [email protected]; Lei, Jun <[email protected]>; Lakha, Bhawanpreet <[email protected]>
Subject: Re: [PATCH] drm/amd/display: fix undefined struct member reference

Quoted 7 lines · Zhan
Quoted 7 lines

-----Original Message-----
From: Arnd Bergmann <[email protected]>
Sent: 2019/December/10, Tuesday 3:31 PM
To: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Deucher, Alexander

<[email protected]>;

Quoted 13 lines
Quoted 13 lines

Koenig, Christian <[email protected]>; Zhou, David(ChunMing) <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>; Liu, Zhan <[email protected]>
Cc: Arnd Bergmann <[email protected]>; Laktyushkin, Dmytro <[email protected]>; Lakha, Bhawanpreet <[email protected]>; Lei, Jun <[email protected]>; Liu, Charlene <[email protected]>; Yang, Eric <[email protected]>; Cornij, Nikola <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [PATCH] drm/amd/display: fix undefined struct member reference

Quoted 3 lines
Quoted 3 lines

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

Quoted 4 lines
Quoted 4 lines

if that is
missing:

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:926:1

Quoted 10 lines
Quoted 8 lines

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

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.

Quoted 1 line
Quoted 9 lines
Quoted 1 line

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

Quoted 30 lines

Nicholas Kazlauskas

Quoted 28 lines
Quoted 21 lines
---
  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +2 -1
index faab89d1e694..fdf93e6edf43 100644
@@ -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 = {
--
Quoted 1 line

2.20.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx