v2 gated intel_dp_needs_as_sdp() on vrr.enable || cmrr.enable. Ville
pointed out that this function is also how we size the optimized VRR
guardband, and that looking at vrr.enable there forces a full modeset
when userspace toggles Adaptive Sync.
That coupling is the bug, not the send predicate. Split it:
1/3 intel_dp_sdp_min_guardband(..., true) reserves AS SDP lines on
HAS_AS_SDP platforms even when the packet is not enabled. After
this, toggling vrr.enable does not change crtc_vblank_start.
2/3 Send the packet only when VRR or CMRR is actually running.
Predicate is vrr.enable || vrr.cmrr.enable to match drm-tip's
nested cmrr (v2 used the older sibling cmrr.enable). Now safe
because 1/3 already reserved the guardband. This is the 7.2
regression: intel_vrr_possible() is flipline != 0, and fixed-RR
timings program flipline, so we transmit DP_AS_SDP_AVT_FIXED_VTOTAL
on a constant refresh. Panel Replay aux-less without async video
timing still takes the early return in intel_dp_needs_as_sdp()
from 6a1712052859 and still gets that packet; this machine does
not hit that path. A 7.2 stable backport needs the sibling
crtc_state->cmrr.enable spelling.
3/3 On this panel, Adaptive Sync = Always still streaks on s2idle
resume after 1+2 (operation mode 0, not the mode-1 packet). Write
the SDP in intel_ddi_enable() after intel_vrr_transcoder_enable()
and before intel_enable_transcoder(). Fastset still updates the
packet from intel_ddi_update_pipe_dp() so a runtime Adaptive Sync
toggle does not become a full modeset.
1+2 are the regression fix. 3/3 is the Always resume path on this eDP;
drop it if you want only the Never/Automatic half.
Why not vrr.in_range (series 174831 1/3): this panel's EDID range is
30-120 Hz. 60 Hz and 120 Hz with Adaptive Sync = Never stay in_range,
so that patch still sends AVT_FIXED_VTOTAL here. Reported at
https://lore.kernel.org/r/[email protected]
Not Closes: #9252. 1+2 do not fix Always. 3/3 does.
These patches are against drm-tip, not 7.2.8.
Machine: Lenovo ThinkBook 14 G8+ IPH (21VG), PTL 8086:b080, eDP
3072x1920, EDID 30-120 Hz. Tested by rebuilding xe.ko on
7.2.8-200.fc44.x86_64, and on a full drm-tip kernel. Same results
on both:
Never / Automatic, boot and lid s2idle: clean with 1+2 (and with 1+2+3).
Always, lid s2idle: still streaks with 1+2; clean with 1+2+3.
Runtime Never <-> Always on an already-lit panel: already clean.
Ville in_range, delayed send, and never-send were tried earlier; the
first two still streak, never-send is clean on both policies but is
not upstreamable.
v1: https://lore.kernel.org/r/[email protected]
v2: https://lore.kernel.org/r/[email protected]
Xizhe Tang (3):
drm/i915/dp: Reserve AS SDP guardband even when VRR is off
drm/i915/dp: Send AS SDP only when VRR or CMRR is enabled
drm/i915/ddi: Program AS SDP before enabling the transcoder
drivers/gpu/drm/i915/display/intel_ddi.c | 4 ++++
drivers/gpu/drm/i915/display/intel_dp.c | 35 ++++++++++++++++++++++++++++----
drivers/gpu/drm/i915/display/intel_dp.h | 2 ++
3 files changed, 37 insertions(+), 4 deletions(-)
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/9252