<p dir="ltr"><br>
On Mar 26, 2016 3:09 PM, "Rob Clark" <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>> wrote:<br>
><br>
> On Fri, Mar 25, 2016 at 9:38 PM, Stéphane Marchesin <<a href="mailto:marcheu@google.com">marcheu@google.com</a>> wrote:<br>
> > On Wed, Mar 23, 2016 at 5:22 PM, Rob Herring <<a href="mailto:robh@kernel.org">robh@kernel.org</a>> wrote:<br>
> >> On Fri, Mar 4, 2016 at 12:07 PM, Rob Clark <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>> wrote:<br>
> >>> On Fri, Mar 4, 2016 at 12:59 PM, Rob Clark <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>> wrote:<br>
> >>>> So, I've been advocating that for android, gallium drivers use<br>
> >>>> gralloc_drm_pipe, since with android it seems like you end up with<br>
> >>>> both gralloc and libGL in the same process, and having both share the<br>
> >>>> same pipe_screen avoids lots of headaches with multiple gem handles<br>
> >>>> pointing to same underlying buffer.<br>
> >>>><br>
> >>>> But the awkward thing is that gralloc_drm_pipe is using gallium APIs<br>
> >>>> that aren't particularly intended to be used out-of-tree. Ie. not<br>
> >>>> really stable APIs. At the time, the thing that made sense to me was<br>
> >>>> to pull drm_gralloc into mesa. But at the time, there were no<br>
> >>>> non-mesa users of drm_gralloc, which isn't really true anymore.<br>
> >>>><br>
> >>>> Maybe what makes more sense now is to implement a gralloc state<br>
> >>>> tracker, which exposes a stable API for drm_gralloc? It would mostly<br>
> >>>> be a shim to expose gallium import/export/transfer APIs in a stable<br>
> >>>> way, but would also be where the code that figures out which driver to<br>
> >>>> use to create/get the pipe_screen.<br>
> >>><br>
> >>> and actually, we might just be able to use XA state tracker for this..<br>
> >>> I think it exposes all the necessary import/export/etc stuff that<br>
> >>> gralloc would need..<br>
> >><br>
> >> Rob and I discussed this a bit more F2F recently. An alternative we<br>
> >> discussed would be using GBM instead. GBM seems more inline with<br>
> >> gralloc needs. This would also have the advantage of working with<br>
> >> minigbm as well for non-mesa cases. Any thoughts on GBM vs. XA?<br>
> ><br>
> > gbm as it is misses some bits, for example lock/unlock, and more fine<br>
> > grained usage flags.<br>
> ><br>
> > I'm also planning to look into something similar with minigbm, i.e.<br>
> > have one backend and expose a minigbm and a gralloc frontend on top.<br>
> > But I'm not sure if it's possible/sensible yet.<br>
><br>
> I haven't thought about the details, but in principle I wouldn't be<br>
> opposed to extending gbm to add whatever is needed...</p>
<p dir="ltr">Yeah that's what I want to do: extend the api and the drivers as needed (I might just expose a new internal api but no new gbm api...). But one place where things are fundamentally different is that gbm in mesa only knows about 3d while gralloc knows about system wide stuff like video etc.</p>
<p dir="ltr">><br>
> it certainly would be convenient to not have to care about both gbm<br>
> and gralloc from driver standpoint.</p>
<p dir="ltr">Absolutely.</p>
<p dir="ltr">Stéphane</p>
<p dir="ltr">><br>
> BR,<br>
> -R<br>
><br>
><br>
> > Stéphane<br>
> ><br>
> >><br>
> >> I spent a bit of time and dug into GBM some more. It appears to me<br>
> >> that GBM would have the same screen sharing issue. AFAICT, it depends<br>
> >> on whether multiple __DRIscreen's are okay as long as the pipe_screen<br>
> >> is shared?<br>
> >><br>
> >> Rob<br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>