[PATCH] drm/amd/display: Fix "dc has no member named dml" compile error
Deucher, Alexander
Alexander.Deucher at amd.com
Thu Mar 21 14:51:10 UTC 2019
Thanks!
Acked-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of sunpeng.li at amd.com <sunpeng.li at amd.com>
Sent: Thursday, March 21, 2019 10:44 AM
To: amd-gfx at lists.freedesktop.org
Cc: Li, Sun peng (Leo); Alex Deucher; Wentland, Harry; Kazlauskas, Nicholas
Subject: [PATCH] drm/amd/display: Fix "dc has no member named dml" compile error
From: Leo Li <sunpeng.li at amd.com>
For DCN disabled builds, dc->dml is stripped out. Therefore, guard usage
in dc_create_state() with CONFIG_DRM_AMD_DC_DCN1_0.
It fixes the following error:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c: In function 'dc_create_state':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:1237:34: error: 'struct dc' has no member named 'dml'
memcpy(&context->bw_ctx.dml, &dc->dml, sizeof(struct display_mode_lib));
^~
Signed-off-by: Leo Li <sunpeng.li at amd.com>
CC: Alex Deucher <alexdeucher at gmail.com>
CC: Harry Wentland <Harry.Wentland at amd.com>
CC: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index cebd083..589cd95 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1245,7 +1245,9 @@ struct dc_state *dc_create_state(struct dc *dc)
* initialize and obtain IP and SOC the base DML instance from DC is
* initially copied into every context
*/
+#ifdef CONFIG_DRM_AMD_DC_DCN1_0
memcpy(&context->bw_ctx.dml, &dc->dml, sizeof(struct display_mode_lib));
+#endif
kref_init(&context->refcount);
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190321/19425f97/attachment.html>
More information about the amd-gfx
mailing list