drm/qxl: handle shadow in primary destroy
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 4 Feb 2021 14:57:08 +0000 (15:57 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 5 Feb 2021 07:52:40 +0000 (08:52 +0100)
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 <kraxel@redhat.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-8-kraxel@redhat.com
drivers/gpu/drm/qxl/qxl_display.c

index d25fd3a..c326412 100644 (file)
@@ -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;