diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2015-03-07 00:58:39 +0000 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-03-10 18:14:40 +0000 |
commit | 0ca03a4087a550646de7f26b6b53a932e8546474 (patch) | |
tree | 38eb3eca83bdd1260767a437b1482a6d5bd9c736 /exynos/fimg2d.h | |
parent | b374a59e0e2ef52fed737f6db9ee1e40caca46ea (diff) |
drm: add drmGet(Primary|Render)DeviceNameFromFd functions
Currently most places assume reliable primary(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 or render device name, given an fd. The latter may belong to
either the master, control or render node device.
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.
v4:
- Update commit message to reflect the function name changes.
Cc: Frank Binns <frank.binns@imgtec.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Diffstat (limited to 'exynos/fimg2d.h')
0 files changed, 0 insertions, 0 deletions