]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amd/display: Know what a pageflip is
authorDavid Francis <David.Francis@amd.com>
Wed, 12 Dec 2018 19:11:53 +0000 (14:11 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Jan 2019 21:15:36 +0000 (16:15 -0500)
[Why]
We were assuming that any commit with allow_modeset == false
was a pageflip.  This was against drm intention and only
worked by sheer luck

[How]
A pageflip is the change from one framebuffer to another

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 9b77ace620dbe4db72795907197668123bb463f4..407f733a47ea114df0596c7493a8886ae06fcb13 100644 (file)
@@ -4683,7 +4683,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
                if (!new_crtc_state->active)
                        continue;
 
-               pflip_needed = !state->allow_modeset;
+               pflip_needed = old_plane_state->fb &&
+                       old_plane_state->fb != new_plane_state->fb;
 
                dc_plane = dm_new_plane_state->dc_state;