Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/dp: Fix DSC sink's slice count capability check

A DSC sink supporting DSC slice count N, not necessarily supports slice
counts less than N. Hence the driver should check the sink's support for
a particular slice count before using that slice count, fix
intel_dp_dsc_get_slice_count() accordingly.

Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20251215192357.172201-4-imre.deak@intel.com

Imre Deak 0b149905 92a73fec

+13 -5
+13 -5
drivers/gpu/drm/i915/display/intel_dp.c
··· 1014 1014 int num_joined_pipes) 1015 1015 { 1016 1016 struct intel_display *display = to_intel_display(connector); 1017 + u32 sink_slice_count_mask = 1018 + drm_dp_dsc_sink_slice_count_mask(connector->dp.dsc_dpcd, false); 1017 1019 u8 min_slice_count, i; 1018 1020 int max_slice_width; 1019 1021 int tp_rgb_yuv444; ··· 1087 1085 (!HAS_DSC_3ENGINES(display) || num_joined_pipes != 4)) 1088 1086 continue; 1089 1087 1090 - if (test_slice_count > 1091 - drm_dp_dsc_sink_max_slice_count(connector->dp.dsc_dpcd, false)) 1092 - break; 1088 + if (!(drm_dp_dsc_slice_count_to_mask(test_slice_count) & 1089 + sink_slice_count_mask)) 1090 + continue; 1093 1091 1094 1092 /* 1095 1093 * Bigjoiner needs small joiner to be enabled. ··· 1106 1104 return test_slice_count; 1107 1105 } 1108 1106 1109 - drm_dbg_kms(display->drm, "Unsupported Slice Count %d\n", 1110 - min_slice_count); 1107 + /* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */ 1108 + sink_slice_count_mask <<= 1; 1109 + drm_dbg_kms(display->drm, 1110 + "[CONNECTOR:%d:%s] Unsupported slice count (min: %d, sink supported: %*pbl)\n", 1111 + connector->base.base.id, connector->base.name, 1112 + min_slice_count, 1113 + (int)BITS_PER_TYPE(sink_slice_count_mask), &sink_slice_count_mask); 1114 + 1111 1115 return 0; 1112 1116 } 1113 1117