When calculating dsc parameters, the rc parameters calculated by calculate_rc_params() is incorrect in the case of DSC 1.1 and DISPLAY_VER(dev_priv) >= 13. It turns out to be some noise-like lines are displayed on a MIPI DSI panel supporting DSC 1.1. The function calculate_rc_params() is implemented by following the Table E-2 in DSC 1.2a and creates incorrect rc parameters for DSC 1.1. As a result, add the additional condition (vdsc_cfg->dsc_version_minor >= 2) to get the right function to calculate rc parameters for DSC 1.1. v1: initial version. v2: modify the commit comment and change the condition regarding DSC version checking. Cc: Suraj Kandpal <suraj.kandpal@xxxxxxxxx> Cc: Juha-Pekka Heikkil <juha-pekka.heikkila@xxxxxxxxx> Signed-off-by: William Tseng <william.tseng@xxxxxxxxx> --- drivers/gpu/drm/i915/display/intel_vdsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c index b355c479eda3..b0a7a2179844 100644 --- a/drivers/gpu/drm/i915/display/intel_vdsc.c +++ b/drivers/gpu/drm/i915/display/intel_vdsc.c @@ -320,7 +320,7 @@ int intel_dsc_compute_params(struct intel_crtc_state *pipe_config) * upto uncompressed bpp-1, hence add calculations for all the rc * parameters */ - if (DISPLAY_VER(dev_priv) >= 13) { + if (DISPLAY_VER(dev_priv) >= 13 && vdsc_cfg->dsc_version_minor >= 2) { calculate_rc_params(vdsc_cfg); } else { if ((compressed_bpp == 8 || -- 2.34.1