I need some help to fully understand the buffers design

Christopher James Halse Rogers chris at cooperteam.net
Fri Apr 5 08:35:23 UTC 2013


Hey Eleni!

On Thu, Apr 4, 2013 at 7:06 PM, Eleni Maria Stea 
<elenimaria.stea at canonical.com> wrote:
> Hello everyone :)
> 
> I am trying to create an SDL backend for mir so that mir can run 
> inside
> X using SDL functions for the display/input handling. For the buffer
> exchange part, I tried to use the existing GBM at first, as some 
> people
> suggested, but after some tests I did outside mir, it seems that you
> can't have the GBM/DRM working under X (you cannot create the gbm 
> device).
> 

I can't off the top of my head think of a reason why gbm wouldn't work 
under X. You *would* need to manually authenticate your drm fd with 
DRI2Authenticate, because nothing is going to do it for you. That's 
probably why you were finding that you couldn't create the gbm device.


> 
> 
> Since, in the current implementation the client and the server can 
> only
> exchange drm or android buffers, I have to create a 3rd type of 
> buffers
> that can use the same IPC mechanism with the gbm/android ones. I would
> really really appreciate if you could give me a high level overview of
> the buffers design to save me some time!
> 

As I mentioned on IRC, I think this is the perfect time to divorce 
buffer allocation and display, as they're really separate concerns. 
We'll want to do this anyway to support Mir-on-Mir without having to do 
Android-Mir-on-Android-Mir and GBM-Mir-on-GBM-Mir. Then you wouldn't 
have to handle the buffer allocation/passing stuff, just the display.




More information about the Mir-devel mailing list