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

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.