[Mesa-dev] [1/2] loader: add loader_open_name(..)

Martin Fuzzey martin.fuzzey at flowbird.group
Fri Aug 10 12:25:10 UTC 2018


Hi Christian,

On 01/08/18 23:07, Christian Gmeiner wrote:
> Add an improved drmOpenWithType(..) clone which fixes some 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.
>
> Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>

Why do this in mesa rather than fixing (or adding a new version if 
necessary for backwards compatibility) to the libdrm code?

mesa is not the only place that we need to find the node path based on a 
driver name to avoid hard coding or putting brittle paths in config files.

There is at least drm_hwcomposer as well for Android and probably others.

(drm_hwc currently uses a hard coded path overridable by a system property):

     property_get("hwc.drm.device", path, "/dev/dri/card0");


Regards,

Martin



More information about the mesa-dev mailing list