~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/drm/drm_client.h

Version: ~ [ linux-6.1-rc7 ] ~ [ linux-6.0.10 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.80 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.156 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.225 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.267 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.300 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.334 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 
  3 #ifndef _DRM_CLIENT_H_
  4 #define _DRM_CLIENT_H_
  5 
  6 #include <linux/types.h>
  7 
  8 struct drm_client_dev;
  9 struct drm_device;
 10 struct drm_file;
 11 struct drm_framebuffer;
 12 struct drm_gem_object;
 13 struct drm_minor;
 14 struct module;
 15 
 16 /**
 17  * struct drm_client_funcs - DRM client callbacks
 18  */
 19 struct drm_client_funcs {
 20         /**
 21          * @owner: The module owner
 22          */
 23         struct module *owner;
 24 
 25         /**
 26          * @unregister:
 27          *
 28          * Called when &drm_device is unregistered. The client should respond by
 29          * releasing it's resources using drm_client_release().
 30          *
 31          * This callback is optional.
 32          */
 33         void (*unregister)(struct drm_client_dev *client);
 34 
 35         /**
 36          * @restore:
 37          *
 38          * Called on drm_lastclose(). The first client instance in the list that
 39          * returns zero gets the privilege to restore and no more clients are
 40          * called. This callback is not called after @unregister has been called.
 41          *
 42          * This callback is optional.
 43          */
 44         int (*restore)(struct drm_client_dev *client);
 45 
 46         /**
 47          * @hotplug:
 48          *
 49          * Called on drm_kms_helper_hotplug_event().
 50          * This callback is not called after @unregister has been called.
 51          *
 52          * This callback is optional.
 53          */
 54         int (*hotplug)(struct drm_client_dev *client);
 55 };
 56 
 57 /**
 58  * struct drm_client_dev - DRM client instance
 59  */
 60 struct drm_client_dev {
 61         /**
 62          * @dev: DRM device
 63          */
 64         struct drm_device *dev;
 65 
 66         /**
 67          * @name: Name of the client.
 68          */
 69         const char *name;
 70 
 71         /**
 72          * @list:
 73          *
 74          * List of all clients of a DRM device, linked into
 75          * &drm_device.clientlist. Protected by &drm_device.clientlist_mutex.
 76          */
 77         struct list_head list;
 78 
 79         /**
 80          * @funcs: DRM client functions (optional)
 81          */
 82         const struct drm_client_funcs *funcs;
 83 
 84         /**
 85          * @file: DRM file
 86          */
 87         struct drm_file *file;
 88 };
 89 
 90 int drm_client_init(struct drm_device *dev, struct drm_client_dev *client,
 91                     const char *name, const struct drm_client_funcs *funcs);
 92 void drm_client_release(struct drm_client_dev *client);
 93 void drm_client_add(struct drm_client_dev *client);
 94 
 95 void drm_client_dev_unregister(struct drm_device *dev);
 96 void drm_client_dev_hotplug(struct drm_device *dev);
 97 void drm_client_dev_restore(struct drm_device *dev);
 98 
 99 /**
100  * struct drm_client_buffer - DRM client buffer
101  */
102 struct drm_client_buffer {
103         /**
104          * @client: DRM client
105          */
106         struct drm_client_dev *client;
107 
108         /**
109          * @handle: Buffer handle
110          */
111         u32 handle;
112 
113         /**
114          * @pitch: Buffer pitch
115          */
116         u32 pitch;
117 
118         /**
119          * @gem: GEM object backing this buffer
120          */
121         struct drm_gem_object *gem;
122 
123         /**
124          * @vaddr: Virtual address for the buffer
125          */
126         void *vaddr;
127 
128         /**
129          * @fb: DRM framebuffer
130          */
131         struct drm_framebuffer *fb;
132 };
133 
134 struct drm_client_buffer *
135 drm_client_framebuffer_create(struct drm_client_dev *client, u32 width, u32 height, u32 format);
136 void drm_client_framebuffer_delete(struct drm_client_buffer *buffer);
137 
138 int drm_client_debugfs_init(struct drm_minor *minor);
139 
140 #endif
141 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp