diff options
| author | Hugo Sales <hugo@hsal.es> | 2026-10-31 14:33:51 +0000 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-11-18 01:51:12 -0500 |
| commit | ad40065dc8bd5a5e16b13523d9fef6ac94cf2b66 (patch) | |
| tree | dd707f0c052e4302513f054f2049f0eb6bed0efb /tools/perf/scripts/python | |
| parent | fb3d0ee0f7cf41488aff58c45f1b31a8f54f3372 (diff) | |
drm/amd/display: Hold the VRR vblank reference only on active CRTCs
amdgpu_dm_handle_vrr_transition() takes a vblank reference when a CRTC
state turns VRR on and drops it when a later state turns it off. It only
looks at freesync_config.state, and disabling a CRTC keeps that state,
so a suspend or DPMS off with VRR active keeps the reference
On resume, drm_atomic_helper_resume() first calls drm_mode_config_reset(),
which swaps the CRTC state for a zeroed one. The restored state then goes
from VRR_STATE_UNSUPPORTED to active and takes a second reference, and
the first is never dropped. The vblank irq stays on for good, so the CRTC
never idles and PSR is never entered
A VRR change on a disabled CRTC can't take the reference at all, since
vblank is off there and drm_crtc_vblank_get() fails with a WARN
On a Cezanne laptop with VRR always on, each suspend added one to the
eDP CRTC's vblank refcount, and it stayed at 1 rather than 0 after VRR
was turned off again
Treat VRR as active for the reference only while the CRTC is active too.
Disabling the CRTC then drops it and enabling it takes it again, which
balances suspend, resume and DPMS, and the get only happens once
manage_dm_interrupts() has turned vblank on
Fixes: 66b0c973d7f7 ("drm/amd/display: Prevent vblank irq disable while VRR is active. (v3)")
Reviewed-by: Ivan Lipski <ivan.lipski@amd.com>
Signed-off-by: Hugo Sales <hugo@hsal.es>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 4232ec2333ab3ef16520b399b30d50f17ceb9c63)
Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
