pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Migrating ports from XFree86 to Xorg (Was: Changing default X11_TYPE from native to modular for some platforms)
Hello,
> I don't see how we can use wsfb, though. The genfb driver does not support
> the graphics card's text mode, which we need for acceptable performance
> on such slow hardware. Or am I missing something? So we still have the
> problem to make new Xorg drivers.
You can switch to graphics on ioctl(WSDISPLAYIO_SMODE, WSDISPLAYIO_MAPPED) and
back on WSDISPLAYIO_EMUL. Some drivers use it to switch the hardware to 24bit
for X while running the console in 8 bit. See cgfourteen, crmfb and ag10e for
example.
Also, vcons has a few tricks to speed up dumb framebuffers ( seriously, is the
blitter /that/ slow? ) - use VCONS_DONT_READ ( see for example the genfb,
cgfourteen and cgthree drivers ) which eliminates framebuffer reads and instead
just redraws whatever needs to be redrawn from the relevant text buffer which
gives a nice speedup on slow, dumb framebuffers.
If you run something VGA-ish in text mode you may also want to think about
implementing blitter support - Cirrus and S3 docs shouldn't be that hard to
find.
You will want to implement at least an accelerated putchar() using whatever
colour expansion scheme your hardware supports so you don't have to map the
framebuffer at all ( and VCONS_DONT_READ with an accelerated putchar() may
scroll faster than the blitter on some old hardware )
I don't know what caching modes the various 68k CPUs support, many more modern
ones support something that's still uncached but allows for write combining,
prefetching, relaxed ordering or any combination thereof, which is useful for
accessing device memory ( like framebuffers ). This can be enabled using the
BUS_SPACE_MAP_PREFETCHABLE flag in bus_space_(m)map() if your underlying pmap
supports it. I added support for this on PowerPC ( don't set the G bit for
relaxed ordering, buffering etc. ), ARM ( allow write buffering ), MIPS ( use
the 'accelerated' CCA if the CPU supports it ) - if your CPUs have anything
like this you may want to support it, any little speedup helps and on slow
hardware with dumb framebuffers it's often quite noticeable. Even if you have
hardware acceleration the Xserver will want to access video memory at some
point.
have fun
Michael
Home |
Main Index |
Thread Index |
Old Index