summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-01-29 09:49:19 (GMT)
committerDavid Herrmann <dh.herrmann@gmail.com>2014-03-16 11:25:17 (GMT)
commit1616c525b98deb34b8f4b02eccf0ae3a1310fa27 (patch)
treed28625fe2ae686919c757df8ec6b8940e0d46d22 /include/drm
parent099d1c290e2ebc3b798961a6c177c3aef5f0b789 (diff)
downloadlinux-1616c525b98deb34b8f4b02eccf0ae3a1310fa27.tar.xz
drm: add minor-lookup/release helpers
Instead of accessing drm_minors_idr directly, this adds a small helper to hide the internals. This will help us later to remove the drm_global_mutex requirement for minor-lookup. Furthermore, this also makes sure that minor->dev is always valid and takes a reference-count to the device as long as the minor is used in an open-file. This way, "struct file*"->private_data->dev is guaranteed to be valid (which it has to, as we cannot reset it). Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drmP.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 4e53f16..8296316 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1672,6 +1672,10 @@ void drm_dev_ref(struct drm_device *dev);
void drm_dev_unref(struct drm_device *dev);
int drm_dev_register(struct drm_device *dev, unsigned long flags);
void drm_dev_unregister(struct drm_device *dev);
+
+struct drm_minor *drm_minor_acquire(unsigned int minor_id);
+void drm_minor_release(struct drm_minor *minor);
+
/*@}*/
/* PCI section */