From 03fd87db6d55b62a4771626a660a0df3d4a8546a Mon Sep 17 00:00:00 2001 From: Ilya Bakoulin Date: Fri, 3 May 2019 17:22:32 -0400 Subject: drm/amd/display: Fix incorrect DML output_bpp value [Why] The output_bpp pipe parameter was assigned an incorrect value (color depth enum), and subsequently used to overwrite the OutputBpp parameter calculated by DML. Seems like this had no effect except with DSC enabled, which would make DML produce bad outputs. [How] Removed assignment to OutputBpp, fixed output_bpp assignment, and properly set ForcedOutputLinkBPP instead of OutputBpp. Also removed condition in DML that prevented forcing of Output BPP with DSC enabled. Signed-off-by: Ilya Bakoulin Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/amd/display/dc/dml') diff --git a/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c b/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c index a21608cd67ef..4d2a1262d9db 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c +++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c @@ -427,7 +427,12 @@ static void fetch_pipe_params(struct display_mode_lib *mode_lib) (enum output_format_class) (dout->output_format); mode_lib->vba.Output[mode_lib->vba.NumberOfActivePlanes] = (enum output_encoder_class) (dout->output_type); - mode_lib->vba.OutputBpp[mode_lib->vba.NumberOfActivePlanes] = dout->output_bpp; + + if (!dout->dsc_enable) + mode_lib->vba.ForcedOutputLinkBPP[mode_lib->vba.NumberOfActivePlanes] = dout->output_bpp; + else + mode_lib->vba.ForcedOutputLinkBPP[mode_lib->vba.NumberOfActivePlanes] = 0.0; + mode_lib->vba.OutputLinkDPLanes[mode_lib->vba.NumberOfActivePlanes] = dout->dp_lanes; /* TODO: Needs to be set based on dout->audio.audio_sample_rate_khz/sample_layout */ @@ -436,7 +441,6 @@ static void fetch_pipe_params(struct display_mode_lib *mode_lib) mode_lib->vba.AudioSampleLayout[mode_lib->vba.NumberOfActivePlanes] = 1; mode_lib->vba.DRAMClockChangeLatencyOverride = 0.0; - mode_lib->vba.DSCEnabled[mode_lib->vba.NumberOfActivePlanes] = dout->dsc_enable; mode_lib->vba.NumberOfDSCSlices[mode_lib->vba.NumberOfActivePlanes] = dout->dsc_slices; -- cgit