|
|
ae23c9 |
From 6da14e1532783c95c18db157cd8f9b7dada31220 Mon Sep 17 00:00:00 2001
|
|
|
ae23c9 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
ae23c9 |
Date: Wed, 4 Jul 2018 09:54:08 +0200
|
|
|
ae23c9 |
Subject: [PATCH 188/268] virtio-gpu: update old resource too.
|
|
|
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-3-kraxel@redhat.com>
|
|
|
ae23c9 |
Patchwork-id: 81227
|
|
|
ae23c9 |
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 2/3] virtio-gpu: update old resource too.
|
|
|
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 |
When switching scanout from one resource to another we must update the
|
|
|
ae23c9 |
scanout_bitmask field for both new (set bit) and old (clear bit)
|
|
|
ae23c9 |
resource.
|
|
|
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-3-kraxel@redhat.com
|
|
|
ae23c9 |
(cherry picked from commit c806cfa036a7ec991170eb9899f3a676bfcc3253)
|
|
|
ae23c9 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
ae23c9 |
---
|
|
|
ae23c9 |
hw/display/virtio-gpu.c | 7 ++++++-
|
|
|
ae23c9 |
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
|
|
|
ae23c9 |
index 054ec73..336dc59 100644
|
|
|
ae23c9 |
--- a/hw/display/virtio-gpu.c
|
|
|
ae23c9 |
+++ b/hw/display/virtio-gpu.c
|
|
|
ae23c9 |
@@ -590,7 +590,7 @@ static void virtio_unref_resource(pixman_image_t *image, void *data)
|
|
|
ae23c9 |
static void virtio_gpu_set_scanout(VirtIOGPU *g,
|
|
|
ae23c9 |
struct virtio_gpu_ctrl_command *cmd)
|
|
|
ae23c9 |
{
|
|
|
ae23c9 |
- struct virtio_gpu_simple_resource *res;
|
|
|
ae23c9 |
+ struct virtio_gpu_simple_resource *res, *ores;
|
|
|
ae23c9 |
struct virtio_gpu_scanout *scanout;
|
|
|
ae23c9 |
pixman_format_code_t format;
|
|
|
ae23c9 |
uint32_t offset;
|
|
|
ae23c9 |
@@ -664,6 +664,11 @@ static void virtio_gpu_set_scanout(VirtIOGPU *g,
|
|
|
ae23c9 |
dpy_gfx_replace_surface(g->scanout[ss.scanout_id].con, scanout->ds);
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
|
|
|
ae23c9 |
+ ores = virtio_gpu_find_resource(g, scanout->resource_id);
|
|
|
ae23c9 |
+ if (ores) {
|
|
|
ae23c9 |
+ ores->scanout_bitmask &= ~(1 << ss.scanout_id);
|
|
|
ae23c9 |
+ }
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
res->scanout_bitmask |= (1 << ss.scanout_id);
|
|
|
ae23c9 |
scanout->resource_id = ss.resource_id;
|
|
|
ae23c9 |
scanout->x = ss.r.x;
|
|
|
ae23c9 |
--
|
|
|
ae23c9 |
1.8.3.1
|
|
|
ae23c9 |
|