All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/display: mode clock check related to max dotclk frequency
@ 2022-11-09  4:03 Nischal Varide
  2022-11-09  4:24 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Nischal Varide @ 2022-11-09  4:03 UTC (permalink / raw)
  To: intel-gfx, nischal.varide

A check on mode->clock to see if is greater than i915->max_dotclk_freq
or greater than 2 * (i915_max_dotclk_freq) in case of big-joiner and
return an -EINVAL in both the cases

Signed-off-by: Nischal Varide <nischal.varide@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 7400d6b4c587..813f4c369dda 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -995,6 +995,10 @@ intel_dp_mode_valid(struct drm_connector *_connector,
 		bigjoiner = true;
 		max_dotclk *= 2;
 	}
+
+	if (mode->clock > max_dotclk)
+		return -EINVAL;
+
 	if (target_clock > max_dotclk)
 		return MODE_CLOCK_HIGH;
 
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-10  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-09  4:03 [Intel-gfx] [PATCH] drm/i915/display: mode clock check related to max dotclk frequency Nischal Varide
2022-11-09  4:24 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2022-11-09  4:46 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-11-09 10:36 ` [Intel-gfx] [PATCH] " Jani Nikula
2022-11-10  0:00   ` Navare, Manasi
2022-11-09 12:57 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.