mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Gerd Hoffmann <kraxel@redhat.com>, dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Takashi Iwai <tiwai@suse.de>,
	"open list:DRM DRIVER FOR BOCHS VIRTUAL GPU" 
	<virtualization@lists.linux-foundation.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/bochs: fix blanking
Date: Wed, 7 Sep 2022 09:36:06 +0200	[thread overview]
Message-ID: <05d4b35a-7f07-ebf3-e378-69d1b5b47c53@suse.de> (raw)
In-Reply-To: <20220906142957.2763577-1-kraxel@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 1603 bytes --]



Am 06.09.22 um 16:29 schrieb Gerd Hoffmann:
> VGA_IS1_RC is the color mode register (VGA_IS1_RM the one for monochrome
> mode, note C vs. M at the end).  So when using VGA_IS1_RC make sure the
> vga device is actually in color mode and set the corresponding bit in the
> misc register.
> 
> Reproducible when booting VMs in UEFI mode with some edk2 versions (edk2
> fix is on the way too).  Doesn't happen in BIOS mode because in that
> case the vgabios already flips the bit.
> 
> Fixes: 250e743915d4 ("drm/bochs: Add screen blanking support")
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/gpu/drm/tiny/bochs.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c
> index 08de13774862..a51262289aef 100644
> --- a/drivers/gpu/drm/tiny/bochs.c
> +++ b/drivers/gpu/drm/tiny/bochs.c
> @@ -309,6 +309,8 @@ static void bochs_hw_fini(struct drm_device *dev)
>   static void bochs_hw_blank(struct bochs_device *bochs, bool blank)
>   {
>   	DRM_DEBUG_DRIVER("hw_blank %d\n", blank);
> +	/* enable color bit (so VGA_IS1_RC access works) */
> +	bochs_vga_writeb(bochs, VGA_MIS_W, VGA_MIS_COLOR);
>   	/* discard ar_flip_flop */
>   	(void)bochs_vga_readb(bochs, VGA_IS1_RC);
>   	/* blank or unblank; we need only update index and set 0x20 */

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

      reply	other threads:[~2022-09-07  7:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 14:29 Gerd Hoffmann
2022-09-07  7:36 ` Thomas Zimmermann [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=05d4b35a-7f07-ebf3-e378-69d1b5b47c53@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®