Hi, I'd like to try to write a driver for an old GPU, but unfortunatelly I don't even know how to start.
The GPU is VIA Chrome VX900 and last propreitary driver is for Ubuntu 12.10. I've tested it, and it runs fine, it is able to play 1080p video with no noticeable tearing (I think it was H264 encoded), but Ubuntu 12.10 is quite old now (certificate problems etc). There is also an open-source driver, however it currently doesn't support HW acceleration, at least not for video, and moving window or scrolling feels slow as well.
So, I thought, why not to try to write a driver for current kernel that could support smooth desktop animations (like moving window, scrolling, transparency, fade-in/out) and HW accelerated video decoding. I realize it won't be easy and will take some time, however I'd like to try.
On Openchrome project webpage there are two PDFs with GPU's register description, so I hope that could help in future with actual HW acceleration. However to start with I am thinking of something simple, like make single color background on monitor, or some solid-colored boxes, idk.
But how do I start?
I think, first of all I should understand Linux graphics stack, or how to name it. The thing, that user application calls in order to create graphics output.
From a perspective of GPU driver, I probably have to receive and process requests from an upper level API, right? But what is the upper level API for me?
I've heard about DRI, DDX, OpenGL, Mesa, Xserver, X11. However I am not sure how they are connected/tied, I mean, where do they reside in a graphics stack. Which of them I should concern if I am interested in 2D acceleration only? How do they communicate with GPU driver?
I checked the openchrome git repository, but I can't follow the code, since I don't know where is any entry point from which it will start execute, like a main() or something.
I thought there will be some structure with methods to be implemented, idk, like "create_object", "set_object_coords", "rotate_object", and driver will just take care of allocating memory for the object in the right memory region, and pass commands to corresponding registers in GPU. And then you just pass the structure with assigned functions that implements required methods to another function like "register_gpu_driver()", but I couldn't find anything like that there.
As you can see, I have no clue how graphics output generation actually works, but I want to find out. So, could you please give me some advice how to start? Thanks in advance
The GPU is VIA Chrome VX900 and last propreitary driver is for Ubuntu 12.10. I've tested it, and it runs fine, it is able to play 1080p video with no noticeable tearing (I think it was H264 encoded), but Ubuntu 12.10 is quite old now (certificate problems etc). There is also an open-source driver, however it currently doesn't support HW acceleration, at least not for video, and moving window or scrolling feels slow as well.
So, I thought, why not to try to write a driver for current kernel that could support smooth desktop animations (like moving window, scrolling, transparency, fade-in/out) and HW accelerated video decoding. I realize it won't be easy and will take some time, however I'd like to try.
On Openchrome project webpage there are two PDFs with GPU's register description, so I hope that could help in future with actual HW acceleration. However to start with I am thinking of something simple, like make single color background on monitor, or some solid-colored boxes, idk.
But how do I start?
I think, first of all I should understand Linux graphics stack, or how to name it. The thing, that user application calls in order to create graphics output.
From a perspective of GPU driver, I probably have to receive and process requests from an upper level API, right? But what is the upper level API for me?
I've heard about DRI, DDX, OpenGL, Mesa, Xserver, X11. However I am not sure how they are connected/tied, I mean, where do they reside in a graphics stack. Which of them I should concern if I am interested in 2D acceleration only? How do they communicate with GPU driver?
I checked the openchrome git repository, but I can't follow the code, since I don't know where is any entry point from which it will start execute, like a main() or something.
I thought there will be some structure with methods to be implemented, idk, like "create_object", "set_object_coords", "rotate_object", and driver will just take care of allocating memory for the object in the right memory region, and pass commands to corresponding registers in GPU. And then you just pass the structure with assigned functions that implements required methods to another function like "register_gpu_driver()", but I couldn't find anything like that there.
As you can see, I have no clue how graphics output generation actually works, but I want to find out. So, could you please give me some advice how to start? Thanks in advance