Skip to content

Commit

Permalink
drm/qxl: handle shadow in primary destroy
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Gerd Hoffmann committed Feb 5, 2021
1 parent 76aefa4 commit a7709b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/qxl/qxl_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a7709b9

Please sign in to comment.