All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 1882851] [NEW] QEMU video freezes with "Guest disabled display" (virtio driver)
@ 2020-06-09 22:36 Diego Viola
  2020-06-09 23:20 ` [Bug 1882851] " Diego Viola
                   ` (18 more replies)
  0 siblings, 19 replies; 62+ messages in thread
From: Diego Viola @ 2020-06-09 22:36 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

I am using Arch Linux as my Guest and Host OS, after starting qemu with
the following command:

  $ qemu-system-x86_64 -enable-kvm -hda arch-zoom.qcow2 -m 4G -vga
virtio

and waiting for a screen blank, I get this message:

  Guest disabled display

And nothing happens after that, I can move the mouse or hit any key, and
the message is still there.

I can still reboot the VM but that's not optimal.

I can reproduce this with the latest QEMU release (5.0.0) or git master, 
I also tried this with older releases (4.0.0, 3.0.0) and the issue is still there.

I can't reproduce this with other video drivers (std, qxl).

With std/qxl the screen will blank a bit and then continue as normal.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1882851

Title:
  QEMU video freezes with "Guest disabled display" (virtio driver)

Status in QEMU:
  New

Bug description:
  I am using Arch Linux as my Guest and Host OS, after starting qemu
  with the following command:

    $ qemu-system-x86_64 -enable-kvm -hda arch-zoom.qcow2 -m 4G -vga
  virtio

  and waiting for a screen blank, I get this message:

    Guest disabled display

  And nothing happens after that, I can move the mouse or hit any key,
  and the message is still there.

  I can still reboot the VM but that's not optimal.

  I can reproduce this with the latest QEMU release (5.0.0) or git master, 
  I also tried this with older releases (4.0.0, 3.0.0) and the issue is still there.

  I can't reproduce this with other video drivers (std, qxl).

  With std/qxl the screen will blank a bit and then continue as normal.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1882851/+subscriptions


^ permalink raw reply	[flat|nested] 62+ messages in thread
* [PATCH] drm/virtio: fix unblank
  2020-06-09 22:36 [Bug 1882851] [NEW] QEMU video freezes with "Guest disabled display" (virtio driver) Diego Viola
  2020-06-09 23:20 ` [Bug 1882851] " Diego Viola
  2020-06-09 23:24 ` Diego Viola
@ 2020-06-12 11:13 ` Gerd Hoffmann
  2020-06-10 17:55 ` Diego Viola
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 62+ messages in thread
From: Gerd Hoffmann @ 2020-06-12 11:13 UTC (permalink / raw)
  To: dri-devel
  Cc: Gerd Hoffmann, 1882851, David Airlie, Daniel Vetter, Chia-I Wu,
	open list:VIRTIO GPU DRIVER, open list

When going through a disable/enable cycle without changing the framebuffer
the optimization added by commit 3954ff10e06e causes the screen stay
blank.  Add a bool to force an update to fix that.

Cc: 1882851@bugs.launchpad.net
Fixes: 3954ff10e06e ("drm/virtio: skip set_scanout if framebuffer didn't change")
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/virtio/virtgpu_drv.h     | 1 +
 drivers/gpu/drm/virtio/virtgpu_display.c | 1 +
 drivers/gpu/drm/virtio/virtgpu_plane.c   | 4 +++-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 7879ff58236f..6d5410d5dd84 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -138,6 +138,7 @@ struct virtio_gpu_output {
 	int cur_x;
 	int cur_y;
 	bool enabled;
+	bool need_update;
 };
 #define drm_crtc_to_virtio_gpu_output(x) \
 	container_of(x, struct virtio_gpu_output, crtc)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index 2b7e6ae65546..44e9c7b874f5 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -99,6 +99,7 @@ static void virtio_gpu_crtc_atomic_enable(struct drm_crtc *crtc,
 	struct virtio_gpu_output *output = drm_crtc_to_virtio_gpu_output(crtc);
 
 	output->enabled = true;
+	output->need_update = true;
 }
 
 static void virtio_gpu_crtc_atomic_disable(struct drm_crtc *crtc,
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 52d24179bcec..5948031a9ce8 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -163,7 +163,8 @@ static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
 	    plane->state->src_w != old_state->src_w ||
 	    plane->state->src_h != old_state->src_h ||
 	    plane->state->src_x != old_state->src_x ||
-	    plane->state->src_y != old_state->src_y) {
+	    plane->state->src_y != old_state->src_y ||
+	    output->need_update) {
 		DRM_DEBUG("handle 0x%x, crtc %dx%d+%d+%d, src %dx%d+%d+%d\n",
 			  bo->hw_res_handle,
 			  plane->state->crtc_w, plane->state->crtc_h,
@@ -178,6 +179,7 @@ static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
 					   plane->state->src_h >> 16,
 					   plane->state->src_x >> 16,
 					   plane->state->src_y >> 16);
+		output->need_update = false;
 	}
 
 	virtio_gpu_cmd_resource_flush(vgdev, bo->hw_res_handle,
-- 
2.18.4


^ permalink raw reply related	[flat|nested] 62+ messages in thread
* [PATCH] drm/virtio: fix unblank
  2020-06-09 22:36 [Bug 1882851] [NEW] QEMU video freezes with "Guest disabled display" (virtio driver) Diego Viola
  2020-06-09 23:20 ` [Bug 1882851] " Diego Viola
  2020-06-09 23:24 ` Diego Viola
@ 2020-08-07 10:54 ` Gerd Hoffmann
  2020-06-10 17:55 ` Diego Viola
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 62+ messages in thread
From: Gerd Hoffmann @ 2020-08-07 10:54 UTC (permalink / raw)
  To: dri-devel
  Cc: Gerd Hoffmann, 1882851, David Airlie, Daniel Vetter, Chia-I Wu,
	open list:VIRTIO GPU DRIVER, open list

When going through a disable/enable cycle without changing the
framebuffer the optimization added by commit 3954ff10e06e ("drm/virtio:
skip set_scanout if framebuffer didn't change") causes the screen stay
blank.  Add a bool to force an update to fix that.

Cc: 1882851@bugs.launchpad.net
Fixes: 3954ff10e06e ("drm/virtio: skip set_scanout if framebuffer didn't change")
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/virtio/virtgpu_drv.h     | 1 +
 drivers/gpu/drm/virtio/virtgpu_display.c | 1 +
 drivers/gpu/drm/virtio/virtgpu_plane.c   | 4 +++-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 9ff9f4ac0522..7b0c319f23c9 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -138,6 +138,7 @@ struct virtio_gpu_output {
 	int cur_x;
 	int cur_y;
 	bool enabled;
+	bool need_update;
 };
 #define drm_crtc_to_virtio_gpu_output(x) \
 	container_of(x, struct virtio_gpu_output, crtc)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index cc7fd957a307..378be5956b30 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -100,6 +100,7 @@ static void virtio_gpu_crtc_atomic_enable(struct drm_crtc *crtc,
 	struct virtio_gpu_output *output = drm_crtc_to_virtio_gpu_output(crtc);
 
 	output->enabled = true;
+	output->need_update = true;
 }
 
 static void virtio_gpu_crtc_atomic_disable(struct drm_crtc *crtc,
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 52d24179bcec..5948031a9ce8 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -163,7 +163,8 @@ static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
 	    plane->state->src_w != old_state->src_w ||
 	    plane->state->src_h != old_state->src_h ||
 	    plane->state->src_x != old_state->src_x ||
-	    plane->state->src_y != old_state->src_y) {
+	    plane->state->src_y != old_state->src_y ||
+	    output->need_update) {
 		DRM_DEBUG("handle 0x%x, crtc %dx%d+%d+%d, src %dx%d+%d+%d\n",
 			  bo->hw_res_handle,
 			  plane->state->crtc_w, plane->state->crtc_h,
@@ -178,6 +179,7 @@ static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
 					   plane->state->src_h >> 16,
 					   plane->state->src_x >> 16,
 					   plane->state->src_y >> 16);
+		output->need_update = false;
 	}
 
 	virtio_gpu_cmd_resource_flush(vgdev, bo->hw_res_handle,
-- 
2.18.4


^ permalink raw reply related	[flat|nested] 62+ messages in thread
* [PATCH 0/2] drm/virtio: fix unblank
@ 2020-08-18  7:25 Gerd Hoffmann
  2020-08-18  7:25   ` [Bug 1882851] " Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 62+ messages in thread
From: Gerd Hoffmann @ 2020-08-18  7:25 UTC (permalink / raw)
  To: dri-devel; +Cc: Gerd Hoffmann



Gerd Hoffmann (2):
  drm/virtio: fix unblank
  drm/virtio: drop virtio_gpu_output->enabled

 drivers/gpu/drm/virtio/virtgpu_drv.h     |  2 +-
 drivers/gpu/drm/virtio/virtgpu_display.c | 15 +++++++++++----
 drivers/gpu/drm/virtio/virtgpu_plane.c   |  6 ++++--
 3 files changed, 16 insertions(+), 7 deletions(-)

-- 
2.18.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 62+ messages in thread

end of thread, other threads:[~2020-09-15 10:42 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 22:36 [Bug 1882851] [NEW] QEMU video freezes with "Guest disabled display" (virtio driver) Diego Viola
2020-06-09 23:20 ` [Bug 1882851] " Diego Viola
2020-06-09 23:24 ` Diego Viola
2020-06-10  0:02 ` Diego Viola
2020-06-10 17:55 ` Diego Viola
2020-06-11  8:27 ` Gerd Hoffmann
2020-06-11 10:24 ` Diego Viola
2020-06-11 10:28 ` Diego Viola
2020-06-11 19:40 ` Diego Viola
2020-06-11 22:33 ` Diego Viola
2020-06-12  5:40 ` Diego Viola
2020-06-12  5:41 ` Diego Viola
2020-06-12  6:10 ` Diego Viola
2020-06-12 15:15 ` Diego Viola
2020-06-12 15:23 ` Diego Viola
2020-06-12 17:26 ` Diego Viola
2020-06-12 17:44 ` Diego Viola
2020-07-15 16:16 ` Diego Viola
2020-09-14  6:45 ` Diego Viola
2020-09-15 10:26 ` Thomas Huth
2020-06-12 11:13 [PATCH] drm/virtio: fix unblank Gerd Hoffmann
2020-06-12 11:13 ` Gerd Hoffmann
2020-06-12 11:13 ` Gerd Hoffmann
2020-06-12 11:13 ` [Bug 1882851] " Gerd Hoffmann
2020-08-07 10:54 Gerd Hoffmann
2020-08-07 10:54 ` Gerd Hoffmann
2020-08-07 10:54 ` Gerd Hoffmann
2020-08-07 10:54 ` [Bug 1882851] " Gerd Hoffmann
2020-08-07 13:09 ` Daniel Vetter
2020-08-07 13:09   ` Daniel Vetter
2020-08-07 13:09   ` Daniel Vetter
2020-08-17  9:03   ` Gerd Hoffmann
2020-08-17  9:03     ` Gerd Hoffmann
2020-08-17  9:03     ` Gerd Hoffmann
2020-08-17  9:03     ` [Bug 1882851] " Gerd Hoffmann
2020-08-17 10:19     ` Gerd Hoffmann
2020-08-17 10:19       ` Gerd Hoffmann
2020-08-17 10:19       ` Gerd Hoffmann
2020-08-17 10:19       ` [Bug 1882851] " Gerd Hoffmann
2020-08-18  7:25 [PATCH 0/2] " Gerd Hoffmann
2020-08-18  7:25 ` [PATCH 1/2] " Gerd Hoffmann
2020-08-18  7:25   ` Gerd Hoffmann
2020-08-18  7:25   ` Gerd Hoffmann
2020-08-18  7:25   ` [Bug 1882851] " Gerd Hoffmann
2020-08-24  7:24   ` Jiri Slaby
2020-08-24  7:24     ` Jiri Slaby
2020-08-28 11:27     ` Gerd Hoffmann
2020-08-28 11:27       ` Gerd Hoffmann
2020-08-28 11:27       ` Gerd Hoffmann
2020-08-28 11:27       ` [Bug 1882851] " Gerd Hoffmann
2020-09-01  7:34       ` Daniel Vetter
2020-09-01  7:34         ` Daniel Vetter
2020-09-01  7:34         ` Daniel Vetter
2020-09-01 10:20   ` Daniel Vetter
2020-09-01 10:20     ` Daniel Vetter
2020-09-01 10:20     ` Daniel Vetter
2020-08-18  7:25 ` [PATCH 2/2] drm/virtio: drop virtio_gpu_output->enabled Gerd Hoffmann
2020-08-18  7:25   ` Gerd Hoffmann
2020-08-18  7:25   ` Gerd Hoffmann
2020-08-25 21:56 ` [PATCH] drm/virtio: fix unblank Diego Viola
2020-08-25 21:56   ` Diego Viola
2020-08-25 21:56   ` [Bug 1882851] " Diego Viola

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.