diff mbox series

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

Message ID 20210203131615.1714021-5-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series drm/qxl: fix driver shutdown issues. | expand

Commit Message

Gerd Hoffmann Feb. 3, 2021, 1:16 p.m. UTC
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(+)

Comments

Thomas Zimmermann Feb. 3, 2021, 2:07 p.m. UTC | #1
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>

> 
> 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;
>
diff mbox series

Patch

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;