Currently intel_panel_fixed_mode() can return a lower refresh rate mode
for VRR panels if the lower refresh rate mode is first in the list.
This creates problems for seamless switch features like LRR and
Seamless-DRRS, as it results in changes to vsync_start/end causing a
full modeset instead of a seamless switch.
This is particularly problematic for DRRS panels on platforms without
double buffered M/N support for LNL+ (display version 20+), where
seamless clock changes are not possible.
This series attempts to fix this by:
1. Adding a helper to get the highest refresh rate mode from the list of
fixed modes for a connector.
2. When a seamless switch to a lower mode is desired, making
intel_panel_fixed_mode() return the highest refresh rate mode,
provided the requested rate is in VRR range. The vblank is then
extended to provide the desired refresh rate.
To determine whether a full modeset or seamless switch is intended, the
connector state is checked for the allow_modeset flag. A nullable
conn_state parameter is added to intel_panel_fixed_mode() and
intel_panel_compute_config() for this purpose.
Rev2:
- Address Ville's comments to preserve Vtotal-Vsync distance while
adjusting VTOTAL.
- Address Manasi's comments to always go with highest RR mode
irrespective of allow_modeset flag for modes that have same clock but
different votal.
Ankit Nautiyal (6):
drm/i915/display: Deprecate TRANS_VSYNC where VRR TG is always on
drm/i915/panel: Preserve Vtotal-Vsync distance while adjusting vtotal
drm/i915/intel_panel: Add a helper to get the highest refresh rate
mode
drm/i915/intel_panel: Pass crtc_state to intel_panel_compute_config
drm/i915/intel_panel: Use highest refresh rate mode for VRR panels
drm/i915/intel_panel: Refine VRR fixed mode selection for DRRS panels
drivers/gpu/drm/i915/display/icl_dsi.c | 2 +-
drivers/gpu/drm/i915/display/intel_display.c | 19 +++-
drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
drivers/gpu/drm/i915/display/intel_dvo.c | 2 +-
drivers/gpu/drm/i915/display/intel_lvds.c | 2 +-
drivers/gpu/drm/i915/display/intel_panel.c | 94 ++++++++++++++++----
drivers/gpu/drm/i915/display/intel_panel.h | 9 +-
drivers/gpu/drm/i915/display/intel_sdvo.c | 8 +-
drivers/gpu/drm/i915/display/intel_vrr.c | 31 +++++--
drivers/gpu/drm/i915/display/vlv_dsi.c | 2 +-
10 files changed, 130 insertions(+), 41 deletions(-)
--
2.45.2