Skip to content

Commit d1f3462

Browse files
committed
drm/i915/dp: Ensure hactive is divisible by slice count
According to the DSC spec, the slice width should be chosen such that the picture width (hactive) is evenly divisible by the slice width. If not, extra pixels (padding) must be added to the last slice to ensure all slices have the same width. Currently, we do not support handling these extra pixels. Therefore, select a slice count that evenly divides the hactive (slice_width = hactive / slice_count). This check is already implemented for DSI, where the slice count is selected from the BIOS. For DP, currently with 1, 2, 4 slices per pipe it is unlikely to have slice count not being able to divide hactive, but with 3 DSC engines and 3 slices, we can have such cases. Adding this check prepares for future scenarios where such configurations might be used. Signed-off-by: Ankit Nautiyal <[email protected]> Reviewed-by: Suraj Kandpal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent b3f5f0c commit d1f3462

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,9 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
10381038
if (num_joined_pipes > 1 && valid_dsc_slicecount[i] < 2)
10391039
continue;
10401040

1041+
if (mode_hdisplay % test_slice_count)
1042+
continue;
1043+
10411044
if (min_slice_count <= test_slice_count)
10421045
return test_slice_count;
10431046
}

0 commit comments

Comments
 (0)