Re: [PATCH 2/2] offb: Add palette hack for qemu "standard vga"

From
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date
2011-12-15 08:09:51
Also in
linuxppc-dev
Reply to
Andreas Färber, 2011-12-15
On Thu, 2011-12-15 at 08:49 +0100, Andreas Färber wrote:
Am 15.12.2011 00:58, schrieb Benjamin Herrenschmidt:
quoted
We rename the mach64 hack to "simple" since that's also applicable
to anything using VGA-style DAC IO ports (set to 8-bit DAC) and we
use it for qemu vga.

Note that this is keyed on a device-tree "compatible" property that
is currently only set by an upcoming version of SLOF when using the
qemu "pseries" platform. This is on purpose as other qemu ppc platforms
using OpenBIOS aren't properly setting the DAC to 8-bit at the time of
the writing of this patch.

We can fix OpenBIOS later to do that and add the required property, in
which case it will be matched by this change.
Just let me know what's needed for OpenBIOS.
Is this just for -vga std as opposed to the default cirrus?
Yes. Cirrus isn't the default on mac99 and on pseries (tho I will
eventually add a SLOF driver for it as well).

For OpenBIOS I was thinking about just sending you a patch :-) But if
you have more time than I do, what is needed is:

 - Set the 8-bit DAC bit in the VBE enable register when initializing
the card (0x20 off the top of my mind but dbl check). Remove your >> 2
in your palette setting.

 - Implement color! so prom_init can set the initial palette (but that's
not strictly necessary).

 - I assume that the VGA device already has a device_type of "display",
can be open()'ed from the client interface and will have the necessary
properties to be used by offb (width, height, linebytes, depth, and
address if fits in 32-bit (if not, ignore it, offb will pick the largest
BAR)). 

 - Stick "qemu,std-vga" into the compatible property of the vga PCI
device.

Cheers,
Ben.

Thread (3 messages) 3 messages, 2 authors, last reply 2011-12-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help