From: Jiaxi Zhang <[email protected]> The DSI host forces RGB conversion but always selects the DSC 1.1 pre-SCR rate-control defaults. For a DSC 1.2 RGB configuration, select the existing DRM_DSC_1_2_444 table instead. Its recommended parameters differ from the pre-SCR table even for the same bpp/bpc. This changes encoder/PPS RC values, not just the advertised version.
Limit the new selection to version 1.2. Keep the existing defaults for other versions and retain byte-clock rounding, slice handling, supported component depths and fractional-bpp rejection. Reject native 4:2:0/4:2:2 rather than combine their flags with this path's forced RGB conversion. This does not add native YCbCr or future DSC-version support. The table definitions and mode-specific helper are public Linux DRM code: drivers/gpu/drm/display/drm_dsc_helper.c. The earlier Warsaw display recovery is supporting development evidence, not a new hardware test of this target. Signed-off-by: Jiaxi Zhang <[email protected]> --- diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1877,7 +1877,12 @@ static int dsi_populate_dsc_params(struct msm_dsi_host *msm_host, struct drm_dsc_config *dsc) { + enum drm_dsc_params_type rc_params_type = DRM_DSC_1_1_PRE_SCR; int ret; + + /* This DSI path configures RGB, not native subsampled YCbCr. */ + if (dsc->native_420 || dsc->native_422) + return -EOPNOTSUPP; if (dsc->bits_per_pixel & 0xf) { DRM_DEV_ERROR(&msm_host->pdev->dev, "DSI does not support fractional bits_per_pixel\n"); @@ -1908,8 +1913,10 @@ drm_dsc_set_const_params(dsc); drm_dsc_set_rc_buf_thresh(dsc); - /* DPU supports only pre-SCR panels */ - ret = drm_dsc_setup_rc_params(dsc, DRM_DSC_1_1_PRE_SCR); + if (dsc->dsc_version_major == 1 && dsc->dsc_version_minor == 2) + rc_params_type = DRM_DSC_1_2_444; + + ret = drm_dsc_setup_rc_params(dsc, rc_params_type); if (ret) { DRM_DEV_ERROR(&msm_host->pdev->dev, "could not find DSC RC parameters\n"); return ret;
