From fe0ae1a7694996aa0cc24b021f5b5d6b47051e29 Mon Sep 17 00:00:00 2001 From: Nicholas Kazlauskas Date: Mon, 27 May 2019 14:01:48 -0400 Subject: [PATCH] drm/amd/display: Allow fast updates again for swapping cursor buffers [Why] There was a bug caused by incorrect refcounting and pin/unpin for plane framebuffers if they went through the atomic update path that has now been resolved. Cursor updates can cause jiterring to occur if they're waiting for vblank or page flip to be signaled so we want these to go through the fast path as often as possible. [How] Allow cursor framebuffer changes in the fast path. Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 57359037ed7c..3bdeba8c55e5 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4288,20 +4288,10 @@ static int dm_plane_atomic_check(struct drm_plane *plane, static int dm_plane_atomic_async_check(struct drm_plane *plane, struct drm_plane_state *new_plane_state) { - struct drm_plane_state *old_plane_state = - drm_atomic_get_old_plane_state(new_plane_state->state, plane); - /* Only support async updates on cursor planes. */ if (plane->type != DRM_PLANE_TYPE_CURSOR) return -EINVAL; - /* - * DRM calls prepare_fb and cleanup_fb on new_plane_state for - * async commits so don't allow fb changes. - */ - if (old_plane_state->fb != new_plane_state->fb) - return -EINVAL; - return 0; } -- 2.17.1