From: Gerd Hoffmann Date: Thu, 4 Feb 2021 14:57:08 +0000 (+0100) Subject: drm/qxl: handle shadow in primary destroy X-Git-Tag: io_uring-5.13-2021-05-07~38^2~14^2~126 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=a7709b9b89a67f3ead2d188b1d0c261059b1f291;p=linux-2.6-block.git drm/qxl: handle shadow in primary destroy qxl_primary_atomic_disable must check whenever the framebuffer bo has a shadow surface and in case it has check the shadow primary status. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-8-kraxel@redhat.com --- diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index d25fd3acc891..c326412136c5 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -562,6 +562,8 @@ static void qxl_primary_atomic_disable(struct drm_plane *plane, if (old_state->fb) { struct qxl_bo *bo = gem_to_qxl_bo(old_state->fb->obj[0]); + if (bo->shadow) + bo = bo->shadow; if (bo->is_primary) { qxl_io_destroy_primary(qdev); bo->is_primary = false;