On Mon, 10 Jul 2017 13:47:57 +0200, Gerd Hoffmann wrote: > > Hi, > > > But aside from that, can't we just teach these drivers to properly do > > dpms? With the atomic framework dpms is implement as simply turning > > the screen off, any driver should be able to support that properly. > > Well, the virtual hardware simply has no dpms support, except maybe for > cirrus which mimics physical hardware. > > bochs could toggle the blank bit in vga register space. > > virtio and qxl could unmap the plane, but that might have unwanted > effects on the host side because qemu thinks the guest turned off the > display altogether. > > > For the fbcon issue, can we perhaps just unconditionally ask fbcon to > > clear the screen when blanking? It's not really perf critical, so > > doing that for everyone shouldn't hurt. > > Sounds good to me. > > I've seen this on real hardware too btw (arm board with non-working > dpms). So something like below? (Adding Bartlomiej to Cc, as it's fbcon stuff) Takashi -- 8< -- From: Takashi Iwai <tiwai@xxxxxxx> Subject: [PATCH] fbcon: Perform generic blank unconditionally Currently fbcon performs the manual clearance of console as a fallback only when fb_blank() returns an error. Unfortunately, all DRM fbcons running on QEMU don't return the error but only adjust the non-working DPMS, we end up just having the frozen screen upon blank call. Also Gerd suggested that a similar issue could have seen on the bare metal, too. As a simple workaround suggested by Daniel, let's call fbcon_generic_blank() unconditionally at fbcon_blank() so that it always clears the console. Suggested-by: Daniel Vetter <daniel@xxxxxxxx> Cc: Gerd Hoffmann <kraxel@xxxxxxxxxx> Cc: Alexander Graf <agraf@xxxxxxx> Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> --- drivers/video/console/fbcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 12ded23f1aaf..65169a5a1bca 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -2347,8 +2347,8 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) ops->cursor_flash = (!blank); if (!(info->flags & FBINFO_MISC_USEREVENT)) - if (fb_blank(info, blank)) - fbcon_generic_blank(vc, info, blank); + fb_blank(info, blank); + fbcon_generic_blank(vc, info, blank); } if (!blank) -- 2.13.2 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel