[PATCH libdrm v3] drm: add drmGet(Master|Render)NameFrom(Render|Master)FD functions

Emil Velikov emil.l.velikov at gmail.com
Fri Mar 6 17:08:14 PST 2015


On 7 March 2015 at 00:58, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Currently most places assume reliable master <> render node mapping.
> Although this may work in some cases, it is not correct.
>
> Add a couple of helpers that hide the details and provide the name of
> the master/render device name, given an render/master FD.
>
> v2:
>  - Rename Device and Primary to Master (aka the /dev/dri/cardX device).
>  - Check for the file via readdir_r() rather than stat().
>  - Wrap the check into a single function.
>  - Return NULL for non-linux platforms.
>
> v3:
>  - Don't segfault if name is NULL.
>  - Update function names, as suggested by Frank Binns.
And seemingly I've forgot to update the patch summary to reflect the
change. I'll do so before pushing

-Emil


More information about the dri-devel mailing list