qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé via" <qemu-devel@nongnu.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	 Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	BALATON Zoltan <balaton@eik.bme.hu>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Andreas Gustafsson <gson@gson.org>
Subject: Re: [PATCH v2] hw/display/tcx: Mark the VRAM dirty upon reset
Date: Sun, 25 Sep 2022 12:03:48 +0200	[thread overview]
Message-ID: <CAAdtpL46vwpK9cFENkuLAW321MZSab=mCuc=WRQAfUHijfODDQ@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA_F-gLUqrez+bhs7OLgMR7GdR-05Ze9yBuoBdQftAdm3A@mail.gmail.com>

On Sun, Feb 6, 2022 at 11:44 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Sun, 6 Feb 2022 at 09:30, Mark Cave-Ayland
> <mark.cave-ayland@ilande.co.uk> wrote:
> >
> > On 05/02/2022 15:39, Peter Maydell wrote:
> > > The handling of the vram buffer seems weird in this device overall,
> > > though -- the memory block is divided into three parts
> > >   * main vram, one byte per pixel
> > >   * vram24, four bytes per pixel
> > >   * cplane, four bytes per pixel
> > >
> > > As far as I can see, only if depth=24 (fixed at device creation
> > > time) do we use the vram24 and cplane parts. But we create the
> > > memory block at the same size regardless of depth and we expose
> > > the vram24 and cplane parts to the guest as sysbus MMIO regions
> > > that are mapped into guest memory regardless of depth...
> >
> > (goes and looks)
> >
> > It does look a bit odd certainly. Without Blue Swirl being around all I can only
> > guess as to why everything is configured to use an alias onto a single VRAM memory
> > region :/
> >
> > As for exposing the vram24 and cplane parts, I don't think it matters since 24-bit
> > mode is clearly designed to be backwards compatible with 8-bit mode. During
> > initialisation OpenBIOS reads the colour depth using the fw_cfg interface and adds
> > the registers for that mode into the DT as required so the correct information is
> > exposed to the guest.
>
> A guest won't notice if we expose stuff to it that it doesn't expect
> to be there -- but if the 8-bit-only device is not supposed to have
> those memory regions we shouldn't be creating them...

I guess I'll go with your code suggestion as a first step, and we can figure
out whether this MR is pointless and remove it later.


      reply	other threads:[~2022-09-25 10:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  0:05 [PATCH v2] hw/display/tcx: Mark the VRAM dirty upon reset Philippe Mathieu-Daudé via
2022-02-05 14:06 ` Mark Cave-Ayland
2022-02-05 14:19   ` BALATON Zoltan
2022-02-05 15:39     ` Peter Maydell
2022-02-06  9:30       ` Mark Cave-Ayland
2022-02-06 10:43         ` Peter Maydell
2022-09-25 10:03           ` Philippe Mathieu-Daudé via [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='CAAdtpL46vwpK9cFENkuLAW321MZSab=mCuc=WRQAfUHijfODDQ@mail.gmail.com' \
    --to=qemu-devel@nongnu.org \
    --cc=balaton@eik.bme.hu \
    --cc=f4bug@amsat.org \
    --cc=gson@gson.org \
    --cc=kraxel@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=peter.maydell@linaro.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).