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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Add primary plane to commits for correct VRR handling

amdgpu_dm_commit_planes calls update_freesync_state_on_stream only for
the primary plane. If a commit affects a CRTC but not its primary plane,
it would previously not trigger a refresh cycle or affect LFC, violating
current UAPI semantics.

Fixes e.g. atomic commits affecting only the cursor plane being limited
to the minimum refresh rate.

Don't do this for the legacy cursor ioctls though, it would break the
UAPI semantics for those.

Suggested-by: Xaver Hugl <xaver.hugl@kde.org>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3034
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit cc7bfba95966251b254cb970c21627124da3b7f4)
Cc: stable@vger.kernel.org

authored by

Michel Dänzer and committed by
Alex Deucher
3477c1b0 9f9bddfa

+9
+9
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
··· 661 661 return -EINVAL; 662 662 } 663 663 664 + if (!state->legacy_cursor_update && amdgpu_dm_crtc_vrr_active(dm_crtc_state)) { 665 + struct drm_plane_state *primary_state; 666 + 667 + /* Pull in primary plane for correct VRR handling */ 668 + primary_state = drm_atomic_get_plane_state(state, crtc->primary); 669 + if (IS_ERR(primary_state)) 670 + return PTR_ERR(primary_state); 671 + } 672 + 664 673 /* In some use cases, like reset, no stream is attached */ 665 674 if (!dm_crtc_state->stream) 666 675 return 0;