[PATCH] drm/i915/display: Limit max joined dotclock on pipes available

Jani Nikula <[email protected]>
Newsgroups org.freedesktop.lists.intel-xe,org.freedesktop.lists.intel-gfx,org.kernel.vger.stable
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland
Message-ID <[email protected]>
Multiplying the max dotclock based on joiner availability on the
platform alone does not take into account the actual number of pipes
(possibly with some fused) available.

Limit the max joined dotclock based on the actual number of pipes
available.

This is still too optimistic due to other constraints on actual pipes,
but it reduces some of the false hopes at mode enumeration.

Fixes: f4f8f0eaaafc ("drm/i915/display: Consider ultrajoiner for computing maxdotclock")
Cc: Ankit Nautiyal <[email protected]>
Cc: <[email protected]> # v6.13+
Signed-off-by: Jani Nikula <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 829d7a411dcc..44c5d1dde255 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -8113,9 +8113,10 @@ static int max_dotclock(struct intel_display *display)
 {
 	int max_dotclock = display->cdclk.max_dotclk_freq;
 
-	if (HAS_ULTRAJOINER(display))
+	if (HAS_ULTRAJOINER(display) && INTEL_NUM_PIPES(display) >= 4)
 		max_dotclock *= 4;
-	else if (HAS_UNCOMPRESSED_JOINER(display) || HAS_BIGJOINER(display))
+	else if ((HAS_UNCOMPRESSED_JOINER(display) || HAS_BIGJOINER(display)) &&
+		 INTEL_NUM_PIPES(display) >= 2)
 		max_dotclock *= 2;
 
 	return max_dotclock;
-- 
2.47.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.