[PATCH 17/26] drm/i915/dp: Add check for hdisplay divisible by slice count

Ankit Nautiyal ankit.k.nautiyal at intel.com
Wed Aug 7 09:27:44 UTC 2024


As per Bspec:49259 while computing the dsc slice count, we need to
ensure that mode->hdisplay is divisible by the slice count.
This check is there for DSI, where we select slice_count from bios,
but is missing for DP.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 33e54e8374ab..d67cd33ed861 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -995,6 +995,9 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
 		if (joined_pipes == INTEL_PIPE_JOINER_ULTRA && test_slice_count < 8)
 			continue;
 
+		if (mode_hdisplay % test_slice_count)
+			continue;
+
 		if (min_slice_count <= test_slice_count)
 			return test_slice_count;
 	}
-- 
2.45.2



More information about the Intel-gfx-trybot mailing list