[SDL] again with doubts on Xlib
Ryan C. Gordon
icculus at icculus.org
Thu May 24 15:18:14 PDT 2007
> My first doubt: Is Xserver running in user space? if so can it map the
> video memory in it address space? If not, how does it copy the video
It runs in user space as root, and talks to hardware (using ioperm() or
iopl()). In some cases, it talks to a kernel driver that talks to hardware.
> data to video memory? which driver is used by the Xserver to access the
> video memory? In normal X application, the video data is copied twice:
> 1. From application to Xserver memory.
> 2. Xserver to video memory. Am I correct here?
Sometimes, yes. On most X servers, you're writing to shared memory,
though, so step #1 is eliminated; you write to where the Xserver wants
it without an extra copy.
Frequently the copy from the X server to video memory is a DMA
operation, not like a real memcpy().
--ryan.
More information about the SDL
mailing list