]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/intel_panel: Avoid calls to intel_panel_fixed_mode() in mode_valid
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 30 Apr 2026 13:12:17 +0000 (18:42 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Mon, 11 May 2026 04:20:54 +0000 (09:50 +0530)
commit9cdd4ec956b6a0fbfaaa88145478ebe680d4dbfd
treed25273747ad4911e7fb15121b8da4129e1c5777c
parentdae483da59657eba80efa0437b72f14d221e1f03
drm/i915/intel_panel: Avoid calls to intel_panel_fixed_mode() in mode_valid

Currently, most callers of intel_panel_mode_valid() also call
intel_panel_fixed_mode(). This is done either to check for the presence of
a fixed mode for the connector or to get the clock of the fixed mode, which
is then compared against the max dotclock for the pipe.

Since intel_panel_mode_valid() already calls intel_panel_fixed_mode()
internally, we can avoid yet another call to intel_panel_fixed_mode() from
the caller.

Remove the redundant call to intel_panel_fixed_mode() in mode_valid paths.
To get the clock for the fixed mode, extend the helper
intel_panel_mode_valid() to accept 'target_clock' as an out param.
The 'target_clock' can then be used by the callers to check against the
max dotclock.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260430131220.3891497-3-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dsi.c
drivers/gpu/drm/i915/display/intel_dvo.c
drivers/gpu/drm/i915/display/intel_lvds.c
drivers/gpu/drm/i915/display/intel_panel.c
drivers/gpu/drm/i915/display/intel_panel.h
drivers/gpu/drm/i915/display/intel_sdvo.c