From: Ankit Nautiyal Date: Wed, 30 Oct 2024 08:41:00 +0000 (+0530) Subject: drm/i915/dp: Limit max compressed bpp to 18 when forcing DSC X-Git-Tag: v6.14-rc1~174^2~12^2~81 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=90b63bd4a67d6f992f1be3447e87ce68274e6763;p=thirdparty%2Fkernel%2Flinux.git drm/i915/dp: Limit max compressed bpp to 18 when forcing DSC While forcing DSC when it is not actually required, the max compressed bpp from the source gets picked for compression for some pipe bpps. Apparently, when DSC is not required, forcing DSC to the maximum compressed bpp seems to cause underruns. To avoid this, limit the max compressed bpp to 18 while forcing DSC. This value works across platforms with different pipe bpps and prevents underruns. Signed-off-by: Ankit Nautiyal Reviewed-by: Naga Venkata Srikanth V Link: https://patchwork.freedesktop.org/patch/msgid/20241030084100.1361689-1-ankit.k.nautiyal@intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index b40964d654972..053a9a4182e73 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2039,6 +2039,15 @@ static int dsc_src_max_compressed_bpp(struct intel_dp *intel_dp) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); + /* + * Forcing DSC and using the platform's max compressed bpp is seen to cause + * underruns. Since DSC isn't needed in these cases, limit the + * max compressed bpp to 18, which is a safe value across platforms with different + * pipe bpps. + */ + if (intel_dp->force_dsc_en) + return 18; + /* * Max Compressed bpp for Gen 13+ is 27bpp. * For earlier platform is 23bpp. (Bspec:49259).