Commit af4c1a86 authored by Gerd Hoffmann's avatar Gerd Hoffmann

drm/qxl: balance dumb_shadow_bo pin

The shadow bo is created in pinned state, so we have to unpin it when
dropping the reference.  Otherwise ttm is unhappy and throws a WARN()
on release.
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20210511104522.2694803-3-kraxel@redhat.com
parent 1d878df0
...@@ -801,6 +801,7 @@ static void qxl_prepare_shadow(struct qxl_device *qdev, struct qxl_bo *user_bo, ...@@ -801,6 +801,7 @@ static void qxl_prepare_shadow(struct qxl_device *qdev, struct qxl_bo *user_bo,
qdev->dumb_shadow_bo->surf.width != surf.width || qdev->dumb_shadow_bo->surf.width != surf.width ||
qdev->dumb_shadow_bo->surf.height != surf.height) { qdev->dumb_shadow_bo->surf.height != surf.height) {
if (qdev->dumb_shadow_bo) { if (qdev->dumb_shadow_bo) {
qxl_bo_unpin(qdev->dumb_shadow_bo);
drm_gem_object_put drm_gem_object_put
(&qdev->dumb_shadow_bo->tbo.base); (&qdev->dumb_shadow_bo->tbo.base);
qdev->dumb_shadow_bo = NULL; qdev->dumb_shadow_bo = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment