qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VGA hardware cursor query


From: BALATON Zoltan
Subject: Re: VGA hardware cursor query
Date: Sun, 7 Aug 2022 17:18:09 +0200 (CEST)

On Sun, 7 Aug 2022, Elliot Nunn wrote:
I want to give Mac OS 9 clients access to hardware cursor support, to improve
responsiveness in absolute-cursor mode.
Would it be acceptable to add a hardware cursor interface to the VGA device?
And if so, can anyone advise on an appropriate register layout?
This is an example of such a patch. Because it alters the Bochs VBE interface
it is ONLY an example, NOT fit for acceptance. I have omitted the changes to
the binary driver qemu_vga.ndrv.
Kind regards,
Elliot Nunn
Nice work! Have you been in contact with the Bochs developers to see what their thoughts are to your proposed changes? Generally QEMU prefers to implement documented specifications, so this would be the best route to go.

Thanks! I don't think it would be appropriate to update the Bochs standard with a feature that they don't use. And on reflection, perhaps the compatibility-oriented VGA device is big enough already.

My plan is to write a Mac OS 9/X "ndrv" targeting virtio-gpu. All going this well, this might become the default mac99 GPU until ati-vga is ready.

Once you have a full virtio driver there's likely not much reason to use ati-vga as virtio-gpu should be better with no legacy stuff that ati-vga has to emulate which may limit its performance and make it more complex than it could be without all those compatibility layers. The ati-vga approach is good if you have a legacy guest which already has an ATI driver but can't or don't want to write a new driver for it. If you can write a new guest driver then you could put the effort there and target virtio instead. Both ways are probably a lot of work, virtio might give better end results but will be specific to the guests you write the driver for while ati-vga would be usable for all guests without needing to change them. Since I have three Amiga like guests of which two are closed source and no published driver API the best option for me was ati-vga but for Mac OS virtio might be a good option if somebody puts in the needed effort.

But virtio-gpu is not compiled into qemu-system-ppc by default. What is the difference between CONFIG_VIRTIO_(GPU|PCI|VGA)? And is configs/devices/ppc-softmmu/default.mak the correct place to declare them?

Probably Gerd can provide better advice but in my (very limited) understanding the difference between them is what interfaces do they provide. VIRTIO_GPU is likely the base which selected by the other two. This plain device needs some way to let the guest know about it (could use some firware specific way and then the devices tree for example) but there's a more standard way: the PCI one appears to the guest as a PCI device so it can detect/configure it via standard methods it already knows. The VGA one also has VGA compatibility so you don't need a firmware driver but can boot it as a normal VGA device then your driver can switch it into virtio mode once the guest started. Maybe you can start with this last one then see if it can be simplified later or works well enough.

Here are some info I've found that may help to get started:

https://www.linux-kvm.org/images/0/09/Qemu-gfx-2016.pdf
https://www.studiopixl.com/2017-08-27/3d-acceleration-using-virtio.html

The course of action to follow in my opinion might be:

1. Get vitio-vga to compile with mac99
2. Try if guest still boots with it (due to the VGA compatibility it probably should but won't use the virtio part yet) 3. Start writing the driver so that it detects the card but does nothing with it yet 4. Enhance the driver so it can switch the card in virtio mode and can communicate with it 5. Set up framebuffer and hwcutsor via virtio and get some basic graphics going
6. Add 2D accel if applicable
7. Explore adding 3D support (this is far away yet, maybe don't even consider it before all the above steps to cut down complexity; even if this is the final goal the basis should be there first so concentrate on those now).

But you know better what and how you want to do, I just shared my thoughts in the hope it might be useful. If not you're free to ignore it.

Regards,
BALATON Zoltan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]