Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f3d862a authored by Gerd Hoffmann's avatar Gerd Hoffmann
Browse files

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: 1277eed5
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarGabriel Krisman Bertazi <krisman@collabora.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170918074145.2257-1-kraxel@redhat.com
parent 4ba72fc0
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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);
}