[Qemu-devel] [PATCH] virtio-gpu: don't clear QemuUIInfo information on reset

Gerd Hoffmann posted 1 patch 6 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170906142058.2460-1-kraxel@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
hw/display/virtio-gpu.c | 12 ------------
1 file changed, 12 deletions(-)
[Qemu-devel] [PATCH] virtio-gpu: don't clear QemuUIInfo information on reset
Posted by Gerd Hoffmann 6 years, 7 months ago
Don't reset window layout information (passed via virtio_gpu_ui_info) on
device reset, so the user interface window layout will be kept intact
over reboots.  The head size and position was commented out already, so
this patch just drops the dead code.  Additionally the enabled head mask
must be kept so multihead setups work properly too.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1460595
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/virtio-gpu.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index f0761cf18b..622ee300f9 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1195,17 +1195,6 @@ static void virtio_gpu_reset(VirtIODevice *vdev)
         virtio_gpu_resource_destroy(g, res);
     }
     for (i = 0; i < g->conf.max_outputs; i++) {
-#if 0
-        g->req_state[i].x = 0;
-        g->req_state[i].y = 0;
-        if (i == 0) {
-            g->req_state[0].width = 1024;
-            g->req_state[0].height = 768;
-        } else {
-            g->req_state[i].width = 0;
-            g->req_state[i].height = 0;
-        }
-#endif
         g->scanout[i].resource_id = 0;
         g->scanout[i].width = 0;
         g->scanout[i].height = 0;
@@ -1213,7 +1202,6 @@ static void virtio_gpu_reset(VirtIODevice *vdev)
         g->scanout[i].y = 0;
         g->scanout[i].ds = NULL;
     }
-    g->enabled_output_bitmask = 1;
 
 #ifdef CONFIG_VIRGL
     if (g->use_virgl_renderer) {
-- 
2.9.3


Re: [Qemu-devel] [PATCH] virtio-gpu: don't clear QemuUIInfo information on reset
Posted by Marc-André Lureau 6 years, 7 months ago
On Wed, Sep 6, 2017 at 4:20 PM, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Don't reset window layout information (passed via virtio_gpu_ui_info) on
> device reset, so the user interface window layout will be kept intact
> over reboots.  The head size and position was commented out already, so
> this patch just drops the dead code.  Additionally the enabled head mask
> must be kept so multihead setups work properly too.
>
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1460595
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


> ---
>  hw/display/virtio-gpu.c | 12 ------------
>  1 file changed, 12 deletions(-)
>
> diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> index f0761cf18b..622ee300f9 100644
> --- a/hw/display/virtio-gpu.c
> +++ b/hw/display/virtio-gpu.c
> @@ -1195,17 +1195,6 @@ static void virtio_gpu_reset(VirtIODevice *vdev)
>          virtio_gpu_resource_destroy(g, res);
>      }
>      for (i = 0; i < g->conf.max_outputs; i++) {
> -#if 0
> -        g->req_state[i].x = 0;
> -        g->req_state[i].y = 0;
> -        if (i == 0) {
> -            g->req_state[0].width = 1024;
> -            g->req_state[0].height = 768;
> -        } else {
> -            g->req_state[i].width = 0;
> -            g->req_state[i].height = 0;
> -        }
> -#endif
>          g->scanout[i].resource_id = 0;
>          g->scanout[i].width = 0;
>          g->scanout[i].height = 0;
> @@ -1213,7 +1202,6 @@ static void virtio_gpu_reset(VirtIODevice *vdev)
>          g->scanout[i].y = 0;
>          g->scanout[i].ds = NULL;
>      }
> -    g->enabled_output_bitmask = 1;
>
>  #ifdef CONFIG_VIRGL
>      if (g->use_virgl_renderer) {
> --
> 2.9.3
>
>



-- 
Marc-André Lureau