Does Linux X-Server directly access GPU memory?
Does Linux X-Server directly access GPU memory?
My main question is there piece of code running in X-Server process memory (Excluded drivers - which we all know can be written in different manners) is directly accessing memory in GPU card?
Or it employs drivers and drm, or any other interface for communication with GPU and queuing draw/render/clear/... commands?
I know question seems lame, but I am interested in specifics?
EDIT:
More specifically: to my understanding kernel communicates with hardware with assistance from drivers, and exposes API to the rest (if I am wrong please correct me).
In this context can X-Server circumvent DMA-API (I am only guessing DMA IO is responsible for communication with periferials) located in kernel to communicate and exchange data with GPU card (in a direct way - without anyones assistance == without kernel, drivers, ...)?
And what would be bare minimum requirement for X-Server to communicate with GPU. I am aiming to understand how this communication is done on low level.
1 Answer
1
It is entirely possible that on Linux a given X server accesses part of the video card memory directly as a framebuffer. It's not the most efficient way of displaying things, but it works.
@SoLaR “Commonly”. en.wikipedia.org/wiki/Framebuffer#Memory_access
– Pascal Cuoq
Apr 27 '15 at 21:38
yes I read that one already, its too generic, and mostly outdated. I do not know how many pages I've read. And even downloaded xserver intel 2d driver which uses drm (3D) for so many commands... My focus is todays xserver, does it reads/writes directly (when I say directly I ment it directly - without anyones assistance) to GPU memory? or for copying it uses some kind of kernel syscall?
– SoLaR
Apr 27 '15 at 21:49
@SoLaR I don't think you are going to get any more specific answer without a more specific question. Good luck.
– Pascal Cuoq
Apr 27 '15 at 22:06
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
in essence xserver can memset(lpgpumem,0,size), where lpgpumem is pointer (not handle) to GPU memory, and this will only GPU Card handle directly without any interaction from kernel or whatever?
– SoLaR
Apr 27 '15 at 21:36