diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-09-18 10:41:45 +0300 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-09-25 09:35:53 +0300 |
commit | 5f3d862a736398e7068fa67142133f1713fdee8c (patch) | |
tree | 8873a6bca7b32fa8d893d50edb3b87c4a6841606 | |
parent | 4ba72fc080ad44a5c1e93449ec070cd4d331803f (diff) | |
download | linux-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
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_display.c | 7 |
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); } |