Skip to content

Commit cee508a

Browse files
anushasrManasi Navare
authored andcommitted
drm/dp/dsc: Add Support for all BPCs supported by TGL
DSC engine on ICL supports only 8 and 10 BPC as the input BPC. But DSC engine in TGL supports 8, 10 and 12 BPC. Add 12 BPC support for DSC while calculating compression configuration. v2: Remove the separate define TGL_DP_DSC_MAX_SUPPORTED_BPC and use the value directly.(More such defines can be removed as part of future patches). (Ville) v3: Use values directly instead of accessing the defines everytime for min and max DSC BPC. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190820223059.18052-1-anusha.srivatsa@intel.com
1 parent df7415b commit cee508a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@
7070

7171
/* DP DSC small joiner has 2 FIFOs each of 640 x 6 bytes */
7272
#define DP_DSC_MAX_SMALL_JOINER_RAM_BUFFER 61440
73-
#define DP_DSC_MIN_SUPPORTED_BPC 8
74-
#define DP_DSC_MAX_SUPPORTED_BPC 10
7573

7674
/* DP DSC throughput values used for slice count calculations KPixels/s */
7775
#define DP_DSC_PEAK_PIXEL_RATE 2720000
@@ -1915,11 +1913,17 @@ static int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
19151913
if (!intel_dp_supports_dsc(intel_dp, pipe_config))
19161914
return -EINVAL;
19171915

1918-
dsc_max_bpc = min_t(u8, DP_DSC_MAX_SUPPORTED_BPC,
1919-
conn_state->max_requested_bpc);
1916+
/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
1917+
if (INTEL_GEN(dev_priv) >= 12)
1918+
dsc_max_bpc = min_t(u8, 12, conn_state->max_requested_bpc);
1919+
else
1920+
dsc_max_bpc = min_t(u8, 10,
1921+
conn_state->max_requested_bpc);
19201922

19211923
pipe_bpp = intel_dp_dsc_compute_bpp(intel_dp, dsc_max_bpc);
1922-
if (pipe_bpp < DP_DSC_MIN_SUPPORTED_BPC * 3) {
1924+
1925+
/* Min Input BPC for ICL+ is 8 */
1926+
if (pipe_bpp < 8 * 3) {
19231927
DRM_DEBUG_KMS("No DSC support for less than 8bpc\n");
19241928
return -EINVAL;
19251929
}

0 commit comments

Comments
 (0)