[Mesa-dev] [PATCH] egl/android: remove flink name support

Robert Foss robert.foss at collabora.com
Thu Apr 26 18:19:55 UTC 2018



On 04/26/2018 07:43 PM, Emil Velikov wrote:
> On 26 April 2018 at 18:34, Rob Herring <robh at kernel.org> wrote:
>> On Thu, Apr 26, 2018 at 11:56 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>> On 26 April 2018 at 03:30, Chih-Wei Huang <cwhuang at linux.org.tw> wrote:
>>>> 2018-04-25 19:55 GMT+08:00 Robert Foss <robert.foss at collabora.com>:
>>>>> Hey Emil & Chih-Wei,
>>>>>
>>>>> On 04/24/2018 01:59 PM, Emil Velikov wrote:
>>>>>>
>>>>>> On 24 April 2018 at 12:28, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>>>>>
>>>>>>> On the topic of keeping the old code behind a #define or just removing
>>>>>>> it, it'll be great if interested parties can reach a consensus.
>>>>>>>
>>>>>> Actually one can simply drop this code and drm_gralloc users can add a
>>>>>> drm_ioctl_permit() hack.
>>>>>> Namely: loosen the restrictions to consider render nodes identical to
>>>>>> primary/card ones.
>>>>>>
>>>>>> Yes, it's a nasty hack, yet no worse than the existing one that
>>>>>> removes the auth :-\
>>>>>
>>>>> I'm fine with adding a #define.
>>>>> Chih-Wei: Do you have any objections?
>>>>
>>>> "keeping the old code behind a #define"?
>>>> Sounds good to me. Thank you!
>>>
>>> Having a look at the Android-x86 kernel:
>>> The current hack in the permission check (see drm_ioctl_permit in [1])
>>> effectively threats render nodes and primary nodes as the same thing.
>>>
>>> Thus, on top of the current patch the !dri2_dpy->is_render_node check
>>> should be removed, for Android-x86.
>>> There's no need to keep the flink code around ;-)
>>
>> Except I don't think drm_gralloc fills in a dma-buf fd in it's
>> handle... There was an AOSP version that did IIRC.
>>
>> Or maybe I'm missing something.
>>
> You're probably right - I haven't looked closely at drm_gralloc in ages.
> Yet again, considering the hacked auth, there should be no blockers to
> tweaking drm_gralloc.
> 
> Either way, I'm just overly hyped looking for ways to remove the flink code.
> Feel free to ignore my suggestions.

I've spent some time today preparing a #ifdef version of what robher submitted.

It's fine, but there is no way automatically enable the HAVE_DRM_GRALLOC #define 
through the build tools. So a small simple patch adding the shared library 
dependency, and adding the -DHAVE_DRM_GRALLOC cflag is needed.

I'll send it out tomorrow, a bit late in the day for sending out patches now ;)


Rob.


More information about the mesa-dev mailing list