Hi,
Few days back I had mailed wrt some doubts regarding the SDL over X11. I
did some analysis and back again with few more queries.
My requirement is to port a library mainly used for gaming over a embedded
linux platform, which has X11, SDL, directfb support. After going through
many docs on X11, directfb, SDL I am again in confused state. Sorry for
being stupid.
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 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:
- From application to Xserver memory.
- Xserver to video memory. Am I correct here?
DirectFB claims its a library which gives direct access to video memory with
hardware acceleration, using the linux framebuffer driver. There is also a X
server (XdirectFb) based on Directfb library, which avoids the X
application’s data to go through some IPCs like sockets or SHM. Instead it
gives the application to map the video memory in its address space, and thus
directly allow it to manipulate the screen. Thereby it claims, it avoids the
context switch between the application and Xserver processes.
Also there is a X extension called DGA ( another one DRI) which claims it
gives direct access to video memory for the X applications. In what way is
it different to Directfb? which driver is it using to give the direct video
memory access. Is the video memory mapped to user space in this setup just
like the directfb?
In the SHM enabled X server, the applications data doesnt go through the
network layer, instead the data is shared between the application and the
Xserver through shared memory. Is it possible to get direct access to video
memory here. Can the video memory be shared to application in this setup?
Sorry for writing this big mail. If I can get a link to some nice document
which hits all my questions , it would be of great help. I am getting many
docs, which are all non converging and are deviated with its own merits over
the others.
Thanks in advance,
Regards,
Pavan**