[Mesa-dev] Removing GRALLOC_MODULE_PERFORM_GET_DRM_FD

Emil Velikov emil.l.velikov at gmail.com
Fri Mar 23 15:55:28 UTC 2018


On 23 March 2018 at 13:15, Tomasz Figa <tfiga at chromium.org> wrote:

>
> Perhaps we could try to use drmOpenWithType() [2]. We could have one
> property that would be passed as "name" argument and another property
> for "busid" argument. I assume "type" would be always RENDER?
>
I would strongly encourage against using the drmOpen* API, it's a DRI1 remnant.
It might work in a particular instance, but has a number of serious
flaws. Some highlights:
 - using busid works only with PCI devices
 - open() w/o O_CLOEXEC
 - when build w/o udev - it creates a node: mkdir, chown(root), chmod, mknod
 - calls back into Xserver/DDX module
 - last but no least - borderline hacks with massive documentation [1]
to keep this running.

Thanks
Emil

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/drm_ioctl.c?h=v4.16-rc6#n41


More information about the mesa-dev mailing list