From: Gerd Hoffmann Date: Tue, 11 May 2021 10:45:22 +0000 (+0200) Subject: drm/qxl: balance dumb_shadow_bo pin X-Git-Tag: accepted/tizen/unified/20230118.172025~6402^2~28^2~411 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af4c1a8613389273acef14ba6b481037e949a318;p=platform%2Fkernel%2Flinux-rpi.git 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: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210511104522.2694803-3-kraxel@redhat.com --- diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index be51837..9e0a1e8 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -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.height != surf.height) { if (qdev->dumb_shadow_bo) { + qxl_bo_unpin(qdev->dumb_shadow_bo); drm_gem_object_put (&qdev->dumb_shadow_bo->tbo.base); qdev->dumb_shadow_bo = NULL;