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: 1277eed5fe
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
This commit is contained in:
@@ -702,14 +702,15 @@ static void qxl_plane_cleanup_fb(struct drm_plane *plane,
|
|||||||
struct drm_gem_object *obj;
|
struct drm_gem_object *obj;
|
||||||
struct qxl_bo *user_bo;
|
struct qxl_bo *user_bo;
|
||||||
|
|
||||||
if (!plane->state->fb) {
|
if (!old_state->fb) {
|
||||||
/* we never executed prepare_fb, so there's nothing to
|
/*
|
||||||
|
* we never executed prepare_fb, so there's nothing to
|
||||||
* unpin.
|
* unpin.
|
||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
obj = to_qxl_framebuffer(plane->state->fb)->obj;
|
obj = to_qxl_framebuffer(old_state->fb)->obj;
|
||||||
user_bo = gem_to_qxl_bo(obj);
|
user_bo = gem_to_qxl_bo(obj);
|
||||||
qxl_bo_unpin(user_bo);
|
qxl_bo_unpin(user_bo);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user