[Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs

Tomasz Figa tfiga at chromium.org
Fri May 25 16:14:05 UTC 2018


On Sat, May 26, 2018 at 12:38 AM Rob Herring <robh at kernel.org> wrote:

> On Fri, May 25, 2018 at 9:25 AM, Tomasz Figa <tfiga at chromium.org> wrote:
> > On Fri, May 25, 2018 at 10:59 PM Rob Herring <robh at kernel.org> wrote:
> >
> >> On Fri, May 25, 2018 at 4:15 AM, Robert Foss <robert.foss at collabora.com

> > wrote:
> >> >
> >> >
> >> > On 2018-05-25 10:38, Tomasz Figa wrote:
> >> >>
> >> >> On Fri, May 25, 2018 at 5:33 PM Robert Foss <
robert.foss at collabora.com>
> >> >> wrote:
> >> >>
> >> >>> Hey,
> >> >>
> >> >>
> >> >>> On 2018-05-25 02:17, Rob Herring wrote:
> >> >>>>
> >> >>>> On Thu, May 24, 2018 at 6:23 AM, Robert Foss <
> > robert.foss at collabora.com>
> >> >>
> >> >> wrote:
> >> >>>>>
> >> >>>>> Hey,
> >> >>>>>
> >> >>>>> I don't think I've received any feedback on this version yet.
> >> >>>>> If anyone has some time to spare, it would be nice to get it
merged.
> >> >>>>>
> >> >>>>> Just to be clear about the libdrm branch linked in the cover
letter,
> >> >>>>> it is not required. Only for virgl platforms which happens to be
> > what
> >> >>>>> I tested on.
> >> >>>>
> >> >>>>
> >> >>>> virgl will still fallback to using the first render node without
> > those
> >> >>>> libdrm changes, right? If not, I don't think we should apply until
> >> >>>> we're not breaking a platform...
> >> >>
> >> >>
> >> >>> No it will not fall back. I agree that holding off makes more
sense.
> >> >>
> >> >>
> >> >> What's the reason of this problems? Is it because of
drmGetDevices()?
> >> >> Since
> >> >> we don't really use it for anything other than getting the list of
> > render
> >> >> nodes in the system, maybe we could just iterate over any
/dev/renderD*
> >> >> nodes explicitly and avoid introducing new problems?
> >> >
> >> >
> >> > That's exactly the problem, and yes we could 100% solve by iterating
> > over
> >> > /dev/renderD* nodes. I originally assumed we wouldn't want to do
that,
> > but
> >> > rather use the libdrm interfaces.
> >> >
> >> > But for the next spin I could avoid using libdrm, should I?
> >
> >> I don't have an opinion on libdrm really, but I do think we should
> >> fallback to the 1st (only) render node rather than just fail.
> >
> > We do, even with libdrm.
> >
> > AFAICT, the problem with virgl seems to be that drmGetDevices() doesn't
> > include devices on virtio bus in the results, which means that there
likely
> > wouldn't be any render node returned.

> Okay. I still don't get why we search by bus in the first place. Who
> cares what bus the gpu sits on.

We don't search by bus. drmGetDevices() iterates over DRI nodes, queries
them and discards those of which bus type it fails to recognize. I have no
idea why it does so, though.


> Now I have an opinion. We should just iterate over render nodes
> matching by name or use the first node if we don't have a set name.

Yeah, I suggested that too in my previous reply. It doesn't look like
libdrm has any sane helper that could help us.

Best regards,
Tomasz


More information about the mesa-dev mailing list