From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Sven Schnelle <svens@stackframe.org>
Cc: Helge Deller <deller@gmx.de>,
qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v3 5/6] hppa: Add emulation of Artist graphics
Date: Sun, 3 Nov 2019 20:56:43 +0000 [thread overview]
Message-ID: <02ba4a0c-97f8-766d-08dd-caff9f448e5f@ilande.co.uk> (raw)
In-Reply-To: <20191101215943.GB9053@t470p.stackframe.org>
On 01/11/2019 21:59, Sven Schnelle wrote:
> On Sat, Oct 26, 2019 at 07:54:40PM +0200, Sven Schnelle wrote:
>> Hi Mark,
>>
>> On Sat, Oct 26, 2019 at 10:35:20AM +0100, Mark Cave-Ayland wrote:
>>
>>>> However, the VRAM in Artist is not really exposed to the Host. Instead,
>>>> there's the Chipset inbetween that can do byte swapping (Colormap is LE,
>>>> VRAM is BE) and Bit-to-Byte/Word/Dword conversion. For example you could
>>>> write 0x55 into that VRAM region, and the chipset would expand that to
>>>> VRAM Bytes: 00 01 00 01 00 01 00 01. And to make it even worse emulation
>>>> wise it can also do different encodings for Read or Write accesses, and
>>>> mask out certain bits of the data. So after trying to convert it to the
>>>> "dirty bitmap" API i decided to just leave it as it is. The CPU load
>>>> used by the display update code is usually < 1%, so it's ok for me.
>>>
>>> Wow that sounds that some interesting hardware(!). Does it make sense to model the
>>> behaviour of the chipset separately using a proxy MemoryRegion similar to virtio i.e.
>>> introduce an intermediate IO MemoryRegion that does the swapping and then forward it
>>> onto the VRAM MemoryRegion?
>>
>> Thanks for the pointer, i'll check whether that would work. For now i
>> think i'll remove the Artist patch from the series, so we can apply the
>> other patches, and i'll re-submit Artist when it's done. I guess the
>> rewrite to use a MemRegion is a bit bigger. But i would to get the other
>> patches in especially the LASI Stuff as both Helge and i have a lot of
>> stuff depending on that.
>
> I've looked into it again and changed my mind. There are at least the following
> functions that the Artist chip does before a Read/Write is passed to/from VRAM:
>
> - endianess conversion (actually configurable via some register, but i don't
> know how and hardwired it depending on CMAP / FB access)
>
> - The Address passed on the System bus are the X/Y coordinates added to the FB
> base address in the selected buffer instead of the VRAM offset for pixel data.
> I think that's configurable via the some registers, but i don't know how.
> Unfortunately there's absolutely no documentation about Artist available and
> everything was developed by reverse engineering.
>
> - bitmap to Byte/Word conversion (not implemented yet for the VRAM window, only
> for the I/O register window)
>
> So in my opinion it's way to much effort to squeeze all of that into the memory
> space, and it is not really a Memory range that's just behind a bus bridge.
Hi Sven,
Certainly in some cases it isn't possible to model devices in QEMU exactly as real
hardware, although I think that some of the ideas above could be used to improve the
implementation without too much extra effort.
Then again from my work on QEMU I completely understand that sometimes this can be
difficult with older, more esoteric devices. Ultimately after review that decision
has to come from the maintainer(s) for the relevant devices/machines, so I guess that
would be Richard and/or Gerd in this case?
ATB,
Mark.
next prev parent reply other threads:[~2019-11-03 21:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 20:59 [PATCH v3 0/6] HPPA: i82596, PS/2 and graphics emulation Sven Schnelle
2019-10-22 20:59 ` [PATCH v3 1/6] hw/hppa/dino.c: Improve emulation of Dino PCI chip Sven Schnelle
2019-10-22 20:59 ` [PATCH v3 2/6] hppa: Add support for LASI chip with i82596 NIC Sven Schnelle
2019-10-22 20:59 ` [PATCH v3 3/6] ps2: accept 'Set Key Make and Break' commands Sven Schnelle
2019-10-23 11:08 ` Philippe Mathieu-Daudé
2019-10-23 12:08 ` Sven Schnelle
2019-10-23 12:32 ` Philippe Mathieu-Daudé
2019-10-22 20:59 ` [PATCH v3 4/6] hppa: add emulation of LASI PS2 controllers Sven Schnelle
2019-10-22 20:59 ` [PATCH v3 5/6] hppa: Add emulation of Artist graphics Sven Schnelle
2019-10-24 20:51 ` Mark Cave-Ayland
2019-10-25 9:31 ` Sven Schnelle
2019-10-26 9:35 ` Mark Cave-Ayland
2019-10-26 17:54 ` Sven Schnelle
2019-11-01 21:59 ` Sven Schnelle
2019-11-03 20:56 ` Mark Cave-Ayland [this message]
2019-11-03 21:03 ` Sven Schnelle
2019-10-26 11:43 ` Philippe Mathieu-Daudé
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=02ba4a0c-97f8-766d-08dd-caff9f448e5f@ilande.co.uk \
--to=mark.cave-ayland@ilande.co.uk \
--cc=deller@gmx.de \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=svens@stackframe.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).