Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/display: Move vrr.guardband/pipeline_full out of !fastset block

Since the vrr.guardband can now change for platforms that always use the
VRR Timing Generator, and it is unsafe to reprogram the guardband on the
fly, move the guardband and pipeline_full checks from the pure !fastboot
path and add a check for intel_vrr_always_use_vrr_tg().

For older platforms the vrr.guardband change happens when VRR Timing
generator is off. For the platforms that always use the VRR Timing
Generator, this will prevent reprogramming the vrr.guardband without a
full modeset. However, this will disrupt LRR functionality for these
platforms.

v2: Modify the check to avoid breaking the LRR on older platform.
(Ville)
v3: Correct the oversight of not removing the lines from the original
location. (Ville)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/20250324133248.4071909-12-ankit.k.nautiyal@intel.com

+7 -3
+5 -2
drivers/gpu/drm/i915/display/intel_display.c
··· 5387 5387 PIPE_CONF_CHECK_I(vrr.vmin); 5388 5388 PIPE_CONF_CHECK_I(vrr.vmax); 5389 5389 PIPE_CONF_CHECK_I(vrr.flipline); 5390 - PIPE_CONF_CHECK_I(vrr.pipeline_full); 5391 - PIPE_CONF_CHECK_I(vrr.guardband); 5392 5390 PIPE_CONF_CHECK_I(vrr.vsync_start); 5393 5391 PIPE_CONF_CHECK_I(vrr.vsync_end); 5394 5392 PIPE_CONF_CHECK_LLI(cmrr.cmrr_m); 5395 5393 PIPE_CONF_CHECK_LLI(cmrr.cmrr_n); 5396 5394 PIPE_CONF_CHECK_BOOL(cmrr.enable); 5395 + } 5396 + 5397 + if (!fastset || intel_vrr_always_use_vrr_tg(display)) { 5398 + PIPE_CONF_CHECK_I(vrr.pipeline_full); 5399 + PIPE_CONF_CHECK_I(vrr.guardband); 5397 5400 } 5398 5401 5399 5402 #undef PIPE_CONF_CHECK_X
-1
drivers/gpu/drm/i915/display/intel_vrr.c
··· 552 552 return intel_de_read(display, TRANS_PUSH(display, cpu_transcoder)) & TRANS_PUSH_SEND; 553 553 } 554 554 555 - static 556 555 bool intel_vrr_always_use_vrr_tg(struct intel_display *display) 557 556 { 558 557 if (!HAS_VRR(display))
+2
drivers/gpu/drm/i915/display/intel_vrr.h
··· 13 13 struct intel_connector; 14 14 struct intel_crtc_state; 15 15 struct intel_dsb; 16 + struct intel_display; 16 17 17 18 bool intel_vrr_is_capable(struct intel_connector *connector); 18 19 bool intel_vrr_is_in_range(struct intel_connector *connector, int vrefresh); ··· 40 39 void intel_vrr_transcoder_enable(const struct intel_crtc_state *crtc_state); 41 40 void intel_vrr_transcoder_disable(const struct intel_crtc_state *crtc_state); 42 41 void intel_vrr_set_fixed_rr_timings(const struct intel_crtc_state *crtc_state); 42 + bool intel_vrr_always_use_vrr_tg(struct intel_display *display); 43 43 44 44 #endif /* __INTEL_VRR_H__ */