If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
![]() |
|
|
#1 |
|
Registered
Join Date: Jul 2012
Posts: 4
|
My goal is ultimately to learn more about GPU architecture and graphics driver development. I'd like to try implementing a 2D kernel space and user space driver, as I've been advised that that is a much easier project when familiarizing oneself with driver development. (I have no driver or kernel dev experience and little linux experience. I've been a OS X developer my whole life however, so I am familiar with the unix environment).
My problem is two-fold: (1) I'm struggling to find a hobbyist-oriented linux box on the market that uses a well-documented graphics card, or for that matter finding any kind of documented GPU. I'm looking for something with a similar price point as the BeagleBoard (which uses the closed-source PowerVR SGX). If something like that doesn't exist, I believe my only other alternative may be to work with the much more complicated Sandy Bridge integrated chip, as I have one in my laptop and it seems to be well (but tersely) documented at intellinuxgraphics.org. (2) Given either direction I go with in point 1, I'm still vague on how to actually communicate with a graphics card. After some digging in the intel linux drivers, it seems that it all boils down to essentially libdrm (which I believe to be the kernel space API vendors must implement for each card...?) calling ioctl on a file in /dev corresponding to the graphics card. Is that correct? Thank you to anyone who can shed some light on my questions and help me along! |
|
|
|
|
|
#2 |
|
Member
Join Date: Mar 2007
Location: Wroclaw, Poland
Posts: 578
|
Don't want this to sound like an ad but why don't you just join Imagination Technologies? We're hiring for driver dev positions in all locations (UK, Poland, India,...).
As for the original question - if what you care about is "how do I write a driver?", you could take the "no hardware" approach and work on a driver, that doesn't really talk to any specific HW. It should be pretty easy with 2D graphics: at the end of your data path in KMD don't hand data over to HW via DMA; instead produce a usable dump that can be fed into something. For 2D raw data dump + commands for the ImageMagick or GraphicsMagick should be enough for starters.
__________________
Shifty Geezer: I don't think the guy really understands the subject. PARANOiA: To be honest, Shifty, what you've described is 95% of Beyond3D - armchair experts spouting fact based on the low-level knowledge of a few. This posting is provided "AS IS" with no warranties, and confers no rights. |
|
|
|
|
|
#3 |
|
Registered
Join Date: Jul 2012
Posts: 4
|
Haha, perhaps someday, but as it be I am still working through my schooling. I have certainly considered the possibility however!
I've considered that route and that is my backup plan. I think you're right in that it would still provide a lot of valuable driver development experience. It would perhaps also be good practice for designing graphic driver interfaces so if in the future I do find what I'm looking for (a simple and well documented graphics card), I could write a backend for my KMD that would interop with the hardware. If you don't mind me asking you Dominik, assuming you work at Imagination Technologies (which I think is a fair assumption to make :P), what was your first exposure writing drivers and first exposure writing drivers specifically for a graphics stack? I just may take the route you're suggesting, but my original question still stands about the availability of any such graphics hardware and I hope others still chime in |
|
|
|
|
|
#4 |
|
Member
Join Date: Mar 2007
Location: Wroclaw, Poland
Posts: 578
|
I haven't been working on drivers prior to joining Imagination at all. I used to work on Volume ShadowCopy Service, user mode infrastructure component that's part of Windows. This however gave me all of the important skills when developing under windows: understanding of the platform and its APIs, familiarity with tools (build infrastructure, WinDbg, scripting), and so on. I also used to do some lame stuff on the demoscene* which gave me the necessary background in graphics programming.
The reality is that in the production environment you won't write code from scratch 99% of the time. I didn't have to figure out how UMD talks to KMD via DXGK, got here after people way smarter than me wrangled that. On that note - have you considered looking at the VirtualBox code? This could be a good starting point and a great working environment at the same time. That said it's worth mentioning that working with existing code can make it hard for you to work on a competing product, so keep that in mind. Not a lawyer however, could be it's absolutely OK and NDA/GPL spoil are just some artifacts of my paranoid imagination. ;] *no, demoscene is not lame - my stuff was :P
__________________
Shifty Geezer: I don't think the guy really understands the subject. PARANOiA: To be honest, Shifty, what you've described is 95% of Beyond3D - armchair experts spouting fact based on the low-level knowledge of a few. This posting is provided "AS IS" with no warranties, and confers no rights. |
|
|
|
|
|
#5 |
|
Registered
Join Date: Jul 2012
Posts: 4
|
That's encouraging to hear that companies are willing to hire without prior (professional) experience in the subfield. Thanks for sharing your background
I do understand that I will never be asked to write much of the foundation code I would have to write for a hobby driver, but I think that's half the fun and a good educational opportunity. I think I will stay away from VirtualBox purely because of the GPL license. I share your fear of potential GPL lawsuits down the road :P. |
|
|
|
|
|
#6 |
|
Now Officially a Top 10 Poster
Join Date: May 2006
Location: Maastricht, The Netherlands
Posts: 12,880
|
Would the Raspberry be suitable for this kind of thing?
|
|
|
|
|
|
#7 | |
|
Member
Join Date: Mar 2007
Location: Wroclaw, Poland
Posts: 578
|
Quote:
__________________
Shifty Geezer: I don't think the guy really understands the subject. PARANOiA: To be honest, Shifty, what you've described is 95% of Beyond3D - armchair experts spouting fact based on the low-level knowledge of a few. This posting is provided "AS IS" with no warranties, and confers no rights. |
|
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Feb 2002
Posts: 2,019
|
Dominik explained it well. It would be a rare school that taught driver development. Coding skills are essential and graphics knowledge very helpful. If you learn driver development on your own and like it enough to continue professionally you'll surely stand out amongst your peers.
|
|
|
|
|
|
#9 |
|
Moderator
Join Date: Feb 2002
Location: Redmond, WA
Posts: 3,163
|
There isn't any low level documentation on the GPU.
Same is true of the TI OMAP processors used in the Beaglebone etc, I really don't understand the secrecy. It's irritating for me because my particular application is extremely timing critical and would be much better without the OS overhead. I really don't see how exposing the control registers and Buffer formats would in anyway compromise the IP of the GPU manufacturers. |
|
|
|
|
|
#10 | ||
|
Registered
Join Date: Jul 2012
Posts: 4
|
Quote:
Quote:
Would Linux on the PS3 be a good platform? I remember a couple of years ago when I was looking into PS3 development, there wasn't any hardware accelerated graphics yet, but maybe this has changed? |
||
|
|
|
|
|
#11 | |
|
Darlek ******
Join Date: Jun 2004
Posts: 9,497
|
Quote:
put value X in register Y issue interrupt Z ?
__________________
Guardian of the Most holy Two Terabytes of Gaming Goodness™ |
|
|
|
|
|
|
#12 | |
|
Junior Member
Join Date: Mar 2012
Location: cracks
Posts: 53
|
Quote:
1. buy subverting the windows kernel book, and learn to write your own rootkit under winxp (leave away vista+ for now). 2. download the old ddk for winxp (or the new one and use the old one for xp), leaving away the MS framework... just write something easy to start on (DONT even think to support a tenth of what MS tells you should do support, life is short...). 3. set up a proper debug environment: take a VM and install XP, and set up winDBG for remote debugging OR use Syser debugger OR (ahem...) SoftICE (supposing you alreay have a license you forgot from old times ofc). You dont have nice R3 debuggers there. 4. Learn x86 assembler and IA32 details (no need to read in full the Volume 2 of intel, any way... unless you want to go really deep). 5. In the book listed at (1) you'll discover many important things that change in Kernel mode, and much information about the way windows works internally (IDT, paging, SSDT, miniport and so on). Let me suggest you to start doing something easy yet funny: make a simple driver that exports a standard interface and start adding (gradually) commands to it. Ah, just remember that when you play with processor's structures (IDT), you'll have to understand how to change them on ALL processors/cores. ...all in all... have fun! r0 coding (and debugging) can be VERY funny ...recently i aided a colleague writing his own r0 driver -he had alot of troubles with it, giving me a lot of fun discussing with him about possible problems and solutions ah, as an additional note... buy the IDA Pro reversing book's of Chris Eagle. I cant imagine r0 coding without reversing the kernel ps: a trick and a valuable suggestion to pin into the side of your monitor ...always, always remember to validate the memory area you go to read or write... memory tends to disappear randomly Last edited by imaxx; 14-Jul-2012 at 21:13. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|