[PATCH v5 4/6] drm/qxl: handle shadow in primary destroy

Subsystems: drm driver for qxl virtual gpu, drm drivers, drm drivers and misc gpu patches, the rest

STALE2027d

2 messages, 2 authors, 2021-02-03 · open the first message on its own page

[PATCH v5 4/6] drm/qxl: handle shadow in primary destroy

From: Gerd Hoffmann <kraxel@redhat.com>
Date: 2021-02-03 13:18:47

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>
---
 drivers/gpu/drm/qxl/qxl_display.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 60331e31861a..f5ee8cd72b5b 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;
-- 
2.29.2

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v5 4/6] drm/qxl: handle shadow in primary destroy

From: Thomas Zimmermann <tzimmermann@suse.de>
Date: 2021-02-03 14:08:42


Am 03.02.21 um 14:16 schrieb Gerd Hoffmann:
qxl_primary_atomic_disable must check whenever the framebuffer bo has a
shadow surface and in case it has check the shadow primary status.
I believe you :)

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
quoted hunk
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
  drivers/gpu/drm/qxl/qxl_display.c | 2 ++
  1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 60331e31861a..f5ee8cd72b5b 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;
-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help