From: Takashi Iwai <tiwai@suse.de>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"open list:VIRTIO CORE,
NET..." <virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH] drm: Fix fbcon blank on QEMU graphics drivers
Date: Tue, 20 Apr 2021 18:41:01 +0200 [thread overview]
Message-ID: <s5h4kg0di3m.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAKMK7uH4Cc-nEAa3CcYTAtq8nh0HHTQNvGNZSZyzB7U-EWae2Q@mail.gmail.com>
On Fri, 16 Apr 2021 20:30:05 +0200,
Daniel Vetter wrote:
>
> On Fri, Apr 16, 2021 at 2:53 PM Takashi Iwai <tiwai@suse.de> wrote:
> >
> > Currently the DRM fbcon helper for console blank,
> > drm_fb_helper_blank(), simply calls drm_fb_helper_dpms() and always
> > returns zero, supposing the driver dealing with DPMS or atomic
> > crtc->active flip to handle blanking the screen. It works on most of
> > devices, but broken on most of KVM/QEMU graphics: bochs, qxl and
> > cirrus drivers just ignore crtc->active state change as blanking (or
> > cirrus ignoring DPMS). In practice, when you run like
> > % setterm --blank force
> > on a VT console, the screen freezes without actually blanking.
> >
> > A simple fix for this problem would be not to rely on DPMS but let
> > fbcon performs the generic blank code. This can be achieved just by
> > returning an error from drm_fb_helper_blank().
> >
> > In this patch, we add a flag, no_dpms_blank, to drm_fb_helper for
> > indicating that the driver doesn't handle blank via DPMS or
> > crtc->active flip. When this flag is set, drm_fb_helper_blank()
> > simply returns an error, so that fbcon falls back to its generic blank
> > handler. The flag is set to both bochs and qxl drivers in this patch,
> > while cirrus is left untouched as it's declared as to-be-deprecated.
> >
> > Link: https://lore.kernel.org/dri-devel/20170726205636.19144-1-tiwai@suse.de/
> > BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1095700
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
>
> Uh we're supposed to fix these drivers to actually blank (scan out
> black, worst case), not paper over it in higher levels. Atomic kms is
> meant to be a somewhat useful abstraction. So now fbcon blanks, but
> your desktop still just freezes.
>
> > ---
> >
> > Here I whip a dead horse again, revisiting the long-standing issue
> > stated in the previous patch set in 2017:
> > https://lore.kernel.org/dri-devel/20170726205636.19144-1-tiwai@suse.de/
> >
> > I thought to refresh the previous patch set at first, but it seems
> > invalid for the atomic modeset case. And for the atomic, it's even
> > more difficult to propagate the return from the bottom to up.
> > So I ended up with this approach as it's much simpler.
>
> Yeah that's because atomic assume you can at least blank your screen to black.
OK, then there is no other way than fixing those drivers to deal with
the blanking...
I cooked up an experimental patch for bochs, and will submit later.
thanks,
Takashi
prev parent reply other threads:[~2021-04-20 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 12:53 [PATCH] drm: Fix fbcon blank on QEMU graphics drivers Takashi Iwai
2021-04-16 18:07 ` kernel test robot
2021-04-16 18:07 ` kernel test robot
2021-04-16 18:30 ` Daniel Vetter
2021-04-20 16:41 ` Takashi Iwai [this message]
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=s5h4kg0di3m.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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