From: Ankit Nautiyal Date: Thu, 30 Apr 2026 13:12:16 +0000 (+0530) Subject: drm/i915/intel_sdvo: Check fixed_mode->clock against max_dotclock in mode_valid X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=dae483da59657eba80efa0437b72f14d221e1f03;p=thirdparty%2Fkernel%2Flinux.git drm/i915/intel_sdvo: Check fixed_mode->clock against max_dotclock in mode_valid For LVDS SDVO, mode validation checks the requested mode against the pipe max dotclock, but does not validate the selected fixed mode clock. After intel_panel_mode_valid(), get the fixed mode and validate its clock against the max dotclock. Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Link: https://patch.msgid.link/20260430131220.3891497-2-ankit.k.nautiyal@intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c index 2e1af9e869de..e7aaa5b203fd 100644 --- a/drivers/gpu/drm/i915/display/intel_sdvo.c +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c @@ -1967,10 +1967,16 @@ intel_sdvo_mode_valid(struct drm_connector *connector, if (IS_LVDS(intel_sdvo_connector)) { enum drm_mode_status status; + const struct drm_display_mode *fixed_mode; status = intel_panel_mode_valid(&intel_sdvo_connector->base, mode); if (status != MODE_OK) return status; + + fixed_mode = intel_panel_fixed_mode(&intel_sdvo_connector->base, mode); + + if (fixed_mode && fixed_mode->clock > max_dotclk) + return MODE_CLOCK_HIGH; } return MODE_OK;