|
|
ae23c9 |
From 590e0651a901f793df8aeee41968b0b2f838e2e8 Mon Sep 17 00:00:00 2001
|
|
|
ae23c9 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
ae23c9 |
Date: Wed, 4 Jul 2018 09:54:09 +0200
|
|
|
ae23c9 |
Subject: [PATCH 189/268] virtio-gpu: disable scanout when backing resource is
|
|
|
ae23c9 |
destroyed
|
|
|
ae23c9 |
MIME-Version: 1.0
|
|
|
ae23c9 |
Content-Type: text/plain; charset=UTF-8
|
|
|
ae23c9 |
Content-Transfer-Encoding: 8bit
|
|
|
ae23c9 |
|
|
|
ae23c9 |
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
ae23c9 |
Message-id: <20180704095409.14514-4-kraxel@redhat.com>
|
|
|
ae23c9 |
Patchwork-id: 81225
|
|
|
ae23c9 |
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 3/3] virtio-gpu: disable scanout when backing resource is destroyed
|
|
|
ae23c9 |
Bugzilla: 1589634
|
|
|
ae23c9 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
ae23c9 |
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
ae23c9 |
Message-id: 20180702162443.16796-4-kraxel@redhat.com
|
|
|
ae23c9 |
(cherry picked from commit 1fccd7c5a9a722a9cbf1bc91693f4618034f01ac)
|
|
|
ae23c9 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
ae23c9 |
---
|
|
|
ae23c9 |
hw/display/virtio-gpu.c | 10 ++++++++++
|
|
|
ae23c9 |
1 file changed, 10 insertions(+)
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
|
|
|
ae23c9 |
index 336dc59..08cd567 100644
|
|
|
ae23c9 |
--- a/hw/display/virtio-gpu.c
|
|
|
ae23c9 |
+++ b/hw/display/virtio-gpu.c
|
|
|
ae23c9 |
@@ -430,6 +430,16 @@ static void virtio_gpu_disable_scanout(VirtIOGPU *g, int scanout_id)
|
|
|
ae23c9 |
static void virtio_gpu_resource_destroy(VirtIOGPU *g,
|
|
|
ae23c9 |
struct virtio_gpu_simple_resource *res)
|
|
|
ae23c9 |
{
|
|
|
ae23c9 |
+ int i;
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+ if (res->scanout_bitmask) {
|
|
|
ae23c9 |
+ for (i = 0; i < g->conf.max_outputs; i++) {
|
|
|
ae23c9 |
+ if (res->scanout_bitmask & (1 << i)) {
|
|
|
ae23c9 |
+ virtio_gpu_disable_scanout(g, i);
|
|
|
ae23c9 |
+ }
|
|
|
ae23c9 |
+ }
|
|
|
ae23c9 |
+ }
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
pixman_image_unref(res->image);
|
|
|
ae23c9 |
virtio_gpu_cleanup_mapping(res);
|
|
|
ae23c9 |
QTAILQ_REMOVE(&g->reslist, res, next);
|
|
|
ae23c9 |
--
|
|
|
ae23c9 |
1.8.3.1
|
|
|
ae23c9 |
|