When calculating dsc parameters, the rc parameters calculated by
calculate_rc_params() may be incorrect in the case of DSC 1.1 and
DISPLAY_VER(dev_priv) >= 13 and cause noise-like lines displayed
on a MIPI DSI panel supporting DSC 1.1. The calculation seems for
DSC 1.2 only. So, instead of calculate_rc_params(), calculate the
rc paramerters with the function drm_dsc_setup_rc_params() for
DSC 1.1.

Cc: Suraj Kandpal <suraj.kand...@intel.com>
Cc: Juha-Pekka Heikkil <juha-pekka.heikk...@intel.com>
Signed-off-by: William Tseng <william.ts...@intel.com>
---
 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..e3443a1d12e0 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

Reply via email to