Hardware accelerated Xorg on Shark is back

November 25, 2009 posted by Michael Lorenz

Hardware accelerated X for Rev. 4 Sharks using the xf86-video-chips driver has been around for a while but Rev. 5 Sharks were stuck with a dumb framebuffer driver. This has changed, a few days ago I committed an Xorg driver for the IGS CyberPro 2010 graphics controller found in Rev. 5 Sharks.
The xf86-video-igs driver supports basic hardware acceleration using EXA ( only solid fills and copy operations so far. The hardware doesn't support any kind of alpha blending so there won't be any xrender acceleration. ) but relies on the kernel's igsfb driver for mode setting. It will NOT work with the vga driver as console.
For now there is no standard kernel interface for programming video modes and the Shark's OpenFirmware implementation does not support mode setting either, but it happily ignores Sun-like mode specifiers in output-device. Therefore, in order to support some way to program video modes, I added code to look for such a mode specifier in igsfb's machine-dependent portion and pass it to the mode setting code. So, now you can
setenv output-device screen:r800x600x60

and igsfb will switch to 800x600 in 60Hz. If no mode is specified or the mode isn't listed in dev/videomodes igsfb will fall back to the old hard-coded 1024x760 at 60Hz mode.
Finally, igsfb will run the console in 8 bit colour for speed but switch to whatever higher colour depth permitted by hardware and available video memory when X runs, so in 800x600 that would be 24bit colour.
To get a usable xorg.conf you only need to run X -configure and add an appropriate DefaultDepth statement to the "Screen" section. The kernel driver will tell you what colour depth it's going to use on startup:
igsfb0 at ofbus2 (display@it3b0): IGS CyberPro 2010 at 0x06000000
igsfb0: 2MB, 800x600, 8bpp
igsfb0: using 32bpp for X



Post a Comment:
Comments are closed for this entry.