summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-09-18 10:41:45 +0300
committerGerd Hoffmann <kraxel@redhat.com>2017-09-25 09:35:53 +0300
commit5f3d862a736398e7068fa67142133f1713fdee8c (patch)
tree8873a6bca7b32fa8d893d50edb3b87c4a6841606 /drivers
parent4ba72fc080ad44a5c1e93449ec070cd4d331803f (diff)
downloadlinux-5f3d862a736398e7068fa67142133f1713fdee8c.tar.xz
qxl: fix framebuffer unpinning
qxl_plane_cleanup_fb() unpins the just activated framebuffer instead of the old one. Oops. Fix it. Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Fixes: 1277eed5fecb8830c8cc414ad70c1ef640464bc0 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/20170918074145.2257-1-kraxel@redhat.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/qxl/qxl_display.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index e1dd05423e86..afbf50d0c08f 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -702,14 +702,15 @@ static void qxl_plane_cleanup_fb(struct drm_plane *plane,
struct drm_gem_object *obj;
struct qxl_bo *user_bo;
- if (!plane->state->fb) {
- /* we never executed prepare_fb, so there's nothing to
+ if (!old_state->fb) {
+ /*
+ * we never executed prepare_fb, so there's nothing to
* unpin.
*/
return;
}
- obj = to_qxl_framebuffer(plane->state->fb)->obj;
+ obj = to_qxl_framebuffer(old_state->fb)->obj;
user_bo = gem_to_qxl_bo(obj);
qxl_bo_unpin(user_bo);
}