I did it, and I didn't shoot myself in the foot. The X server built on
top of a 'magically bank switching framebuffer' ran at about the
same speed as the banked one. Most of the x11perf tests were
withing +/- 10%, with more on the faster side.
Did anybody ever see the original X386 banking macros that tested
for the end of the banking window for _each_ framebuffer access?
[about using the VM hardware for buffer window mapping]
> - most of the PC video cards that do windows do _separate_ windows for
> read and write. However, there is no way we can support this with the
> x86 MMU (it doesn't support write-only mappings), so copying from one
> VGA window to another would be _horribly_ slow because we'd have to
> switch every time (contrast this to doing it by hand, where we can
> just set up a separate read and write window and copy directly).
You can not _enforce_ write only, but you can set up two different
VM area, one for the source (ro) and one for the destination (rw).
>In short, the VM approach is "interesting", but doing it in user space is
>the right way anyway. It might require a bit more from the user program,
>but that's ok.
With mprotect() et al. this is true now. It has not always been.
It should be worth a try.
Pascal
-- Pascal Haible, haible@ITO.Uni-Stuttgart.DE