drm/amd/display: Fix "dc has no member named dml" compile error
Subsystems (3)
PATCH 1/1 drm/amd/display: Fix "dc has no member named dml" compile error
From: Leo Li <[email protected]>
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':
Quoted 1 line
Quoted 1 line
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));
^~--- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -0
@@ -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);
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1553179469-10012-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org
Kazlauskas, Nicholas
Reviewed-by Nicholas KazlauskasQuoted 9 lines · On 3/21/19 10:44 AM, [email protected] wrote:
From: Leo Li <[email protected]>
For DCN disabled builds,
dc->dmlis stripped out. Therefore, guard usage indc_create_state()withCONFIG_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':Quoted 1 line
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:1237:34: error: 'struct dc' has no member named 'dml'
Quoted 8 lines
memcpy(&context->bw_ctx.dml, &dc->dml, sizeof(struct display_mode_lib)); ^~Signed-off-by Leo Li <[email protected]>CC Alex Deucher <[email protected]>CC Harry Wentland <[email protected]>CC Nicholas Kazlauskas <[email protected]>---
I think this is the only place left unguarded at least.
Quoted 9 lines
drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0
drivers/gpu/drm/amd/display/dc/core/dc.c struct dc_state *dc_create_state(struct dc *dc) · line 1253
Quoted 9 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +2
-0@@ -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);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
Acked-byThanks!
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of [email protected] <[email protected]>
Sent: Thursday, March 21, 2019 10:44 AM
To: [email protected]
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 <[email protected]>
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':
Quoted 1 line
Quoted 1 line
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));
^~--- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -0
@@ -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 [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx