summaryrefslogtreecommitdiff
path: root/include/drm/drm_device.h
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2018-07-03 18:03:47 +0200
committerNoralf Trønnes <noralf@tronnes.org>2018-07-10 14:51:37 +0200
commitc76f0f7cb546b661b5e0ac769850a5c854927f65 (patch)
tree2435747fe4864fdd2406be8bcd089fb9e9eda33b /include/drm/drm_device.h
parent5ba57babcb40227ceb70d9bc71afa57e004f8417 (diff)
drm: Begin an API for in-kernel clients
This the beginning of an API for in-kernel clients. First out is a way to get a framebuffer backed by a dumb buffer. Only GEM drivers are supported. The original idea of using an exported dma-buf was dropped because it also creates an anonomous file descriptor which doesn't work when the buffer is created from a kernel thread. The easy way out is to use drm_driver.gem_prime_vmap to get the virtual address, which requires a GEM object. This excludes the vmwgfx driver which is the only non-GEM driver apart from the legacy ones. A solution for vmwgfx will have to be worked out later if it wants to support the client API which it probably will when we have a bootsplash client. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20180703160354.59955-2-noralf@tronnes.org
Diffstat (limited to 'include/drm/drm_device.h')
-rw-r--r--include/drm/drm_device.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
index 858ba19a3e29..f9c6e0e3aec7 100644
--- a/include/drm/drm_device.h
+++ b/include/drm/drm_device.h
@@ -74,6 +74,27 @@ struct drm_device {
struct mutex filelist_mutex;
struct list_head filelist;
+ /**
+ * @filelist_internal:
+ *
+ * List of open DRM files for in-kernel clients. Protected by @filelist_mutex.
+ */
+ struct list_head filelist_internal;
+
+ /**
+ * @clientlist_mutex:
+ *
+ * Protects @clientlist access.
+ */
+ struct mutex clientlist_mutex;
+
+ /**
+ * @clientlist:
+ *
+ * List of in-kernel clients. Protected by @clientlist_mutex.
+ */
+ struct list_head clientlist;
+
/** \name Memory management */
/*@{ */
struct list_head maplist; /**< Linked list of regions */