On 3/21/19 10:44 AM, sunpeng.li@xxxxxxx wrote: > From: Leo Li <sunpeng.li@xxxxxxx> > > 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@xxxxxxx> > CC: Alex Deucher <alexdeucher@xxxxxxxxx> > CC: Harry Wentland <Harry.Wentland@xxxxxxx> > CC: Nicholas Kazlauskas <nicholas.kazlauskas@xxxxxxx> > --- Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@xxxxxxx> I think this is the only place left unguarded at least. > 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); > > _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx