« Submitted! | Home | OpenStreetMapping with a FreeRunner »
June 15, 2009
DRI Front Buffer Handling and KMS
Now that I've got rid of my thesis, it's time to dig my teeth into some fun stuff. I came across a problem with our current DRI architecture for the FreeRunner, which involves trying to combine DRI2 with an existing fbdev-based X driver. The problem arises because we tell EXA that we will allocate memory for pixmaps ourselves (in this case using our GEM interface through libdrm). But, in that case, the X server will attempt to allocate the "screen pixmap", by which I mean the main front buffer which contains what's on the screen, with the same mechanism. This wouldn't be a problem if we could tell, at the time of allocation, that the pixmap being allocated is the screen pixmap, but we can't. At least, not in the tests I've performed.
The "right" way to make this all work is to use kernel modesetting, KMS, to submit the screen pixmap - at a later time - to the lower-level graphics system for display. The execution flow goes something like this:
I took advantage of Truebox's half price deal on debug boards, not knowing how I'd managed to get this far without one. The kit came complete with screwdriver and guitar plectrum for opening the case (sooo much better than the cheap screwdriver and credit card combination I was using before), and they were kind enough to throw in a spare battery at no extra cost. Thanks Truebox!
The "right" way to make this all work is to use kernel modesetting, KMS, to submit the screen pixmap - at a later time - to the lower-level graphics system for display. The execution flow goes something like this:
- Tell EXA we'll handle pixmap allocation.
- At an unspecified point, the screen pixmap gets created via our mechanism.
- Later on, we submit the screen pixmap (in fact, just its GEM handle) to KMS.
- KMS programs the graphics hardware to display the contents of the buffer on the screen.
- Open /dev/fb0, mmap() it. That's what's on the screen.
- Tell EXA we'll handle pixmap allocation.
- At an unspecified point, the screen pixmap gets created via our mechanism.
- Contents of /dev/fb0 are not the same as the screen pixmap.
- Whoops.
I took advantage of Truebox's half price deal on debug boards, not knowing how I'd managed to get this far without one. The kit came complete with screwdriver and guitar plectrum for opening the case (sooo much better than the cheap screwdriver and credit card combination I was using before), and they were kind enough to throw in a spare battery at no extra cost. Thanks Truebox!
By Tom on 3:06 PM | No Comments
Tags: , ,
Search
Monthly Archives
- November 2012 (1)
- August 2012 (1)
- March 2012 (1)
- October 2011 (1)
- July 2011 (1)
- October 2010 (1)
- September 2010 (1)
- August 2010 (1)
- June 2010 (1)
- May 2010 (2)
- April 2010 (1)
- February 2010 (3)
- January 2010 (3)
- December 2009 (2)
- November 2009 (4)
- October 2009 (1)
- September 2009 (2)
- August 2009 (4)
- July 2009 (4)
- June 2009 (5)
- May 2009 (2)
- April 2009 (5)
- March 2009 (5)
- February 2009 (5)
- January 2009 (4)
OpenID accepted here
Learn more about OpenID
- Subscribe to feed Subscribe to this blog's feed
About this Entry
This page contains a single entry by Tom published on June 15, 2009 3:06 PM.
Submitted! was the previous entry in this blog.
OpenStreetMapping with a FreeRunner is the next entry in this blog.
Find recent content on the main index or look in the archives to find all content.
Leave a comment