qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <1882851@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1882851] Re: [PATCH] drm/virtio: fix unblank
Date: Mon, 17 Aug 2020 10:19:25 -0000	[thread overview]
Message-ID: <20200817101925.ljpfgz336zxegsup@sirius.home.kraxel.org> (raw)
In-Reply-To: 20200817090342.bemmtkvz4seayp2i@sirius.home.kraxel.org

On Mon, Aug 17, 2020 at 11:03:42AM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > > --- 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;
> 
> > > --- 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) {
> > 
> > Uh instead of hand-rolling what's essentially a drm_crtc_needs_modeset
> > check, why not use that one? atomic helpers try to keep the usual suspects
> > for state transitions already handy, to avoid every driver rolling their
> > own. Or do I miss something here?
> 
> Well, the virtio-gpu virtual hardware can't do plane updates and crtc
> updates independant from each other.  So the crtc callbacks handle
> disable only (we don't need a fb for that) and leave the enable to the
> plane update.
> 
> I suspect calling drm_atomic_crtc_needs_modeset() in plane update isn't
> going to fly ...

Digged a bit more, seems crtc_state->*_changed is cleared after modeset
so the following plane update wouldn't see it.  Which I think means
there is no way around tracking that in need_update.

output->enabled is probably not needed though, seems I can replace that
by either output->crtc.state->enable or ->active.  Not fully sure which
one, probably ->active.

take care,
  Gerd

-- 
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


  reply	other threads:[~2020-08-17 10:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 11:13 ` [Bug 1882851] [PATCH] drm/virtio: fix unblank Gerd Hoffmann
2020-06-12 15:15 ` [Bug 1882851] Re: QEMU video freezes with "Guest disabled display" (virtio driver) 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-08-07 10:54 ` [Bug 1882851] [PATCH] drm/virtio: fix unblank Gerd Hoffmann
2020-08-17  9:03 ` [Bug 1882851] " Gerd Hoffmann
2020-08-17 10:19   ` Gerd Hoffmann [this message]
2020-08-18  7:25 ` [Bug 1882851] [PATCH 1/2] " Gerd Hoffmann
2020-08-25 21:56 ` [Bug 1882851] [PATCH] " Diego Viola
2020-08-28 11:27 ` [Bug 1882851] Re: [PATCH 1/2] " Gerd Hoffmann
2020-09-14  6:45 ` [Bug 1882851] Re: QEMU video freezes with "Guest disabled display" (virtio driver) Diego Viola
2020-09-15 10:26 ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200817101925.ljpfgz336zxegsup@sirius.home.kraxel.org \
    --to=1882851@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).