All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] drm/bochs: Add screen blanking support
Date: Wed, 21 Apr 2021 10:01:48 +0200	[thread overview]
Message-ID: <s5hsg3kawwj.wl-tiwai@suse.de> (raw)
In-Reply-To: <6d2f59c0-113f-2d9e-1fb3-a794dafbd74a@suse.de>

On Tue, 20 Apr 2021 19:47:31 +0200,
Thomas Zimmermann wrote:
> 
> Hi
> 
> Am 20.04.21 um 18:56 schrieb Takashi Iwai:
> > On bochs DRM driver, the execution of "setterm --blank force" results
> > in a frozen screen instead of a blank screen.  It's due to the lack of
> > the screen blanking support in its code.
> >
> > Actually, the QEMU bochs vga side can switch to the blanking mode when
> > the bit 0x20 is cleared on VGA_ATT_IW register (0x3c0), which updates
> > ar_index in QEMU side.  So, essentially, we'd just need to clear the
> > bit at pipe disable callback; that's what this patch does essentially.
> >
> > However, a tricky part is that the QEMU vga code does treat VGA_ATT_IW
> > register always as "flip-flop"; the first write is for index and the
> > second write is for the data like palette.  Meanwhile, in the current
> > bochs DRM driver, the flip-flop wasn't considered, and it calls only
> > the register update once with the value 0x20.
> >
> 
> Unless bochs does things very different, the index should first be
> reset by reading 0x3da. Then write the index, then the data.
> 
> https://web.stanford.edu/class/cs140/projects/pintos/specs/freevga/vga/vgareg.htm#attribute

Thanks for the pointer!

It seems that QEMU stdvga actually implements the discard of flip flop
bit by reading 0x3da.  Meanwhile, the write of the data isn't needed
in this case because we do care only about the enablement bit 0x20 of
ar_index.

I'll resubmit v2 patch.


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

      parent reply	other threads:[~2021-04-21  8:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 16:56 [PATCH] drm/bochs: Add screen blanking support Takashi Iwai
2021-04-20 17:47 ` Thomas Zimmermann
2021-04-20 17:47   ` Thomas Zimmermann
2021-04-21  7:19   ` Gerd Hoffmann
2021-04-21  7:19     ` Gerd Hoffmann
2021-04-21  8:02     ` Takashi Iwai
2021-04-21  8:01   ` 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=s5hsg3kawwj.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=tzimmermann@suse.de \
    --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 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.