Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. |
| 3 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. |
| 4 | * Copyright (c) 2009-2010, Code Aurora Forum. |
| 5 | * All rights reserved. |
| 6 | * |
| 7 | * Author: Rickard E. (Rik) Faith <faith@valinux.com> |
| 8 | * Author: Gareth Hughes <gareth@valinux.com> |
| 9 | * |
| 10 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 11 | * copy of this software and associated documentation files (the "Software"), |
| 12 | * to deal in the Software without restriction, including without limitation |
| 13 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 14 | * and/or sell copies of the Software, and to permit persons to whom the |
| 15 | * Software is furnished to do so, subject to the following conditions: |
| 16 | * |
| 17 | * The above copyright notice and this permission notice (including the next |
| 18 | * paragraph) shall be included in all copies or substantial portions of the |
| 19 | * Software. |
| 20 | * |
| 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 22 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 23 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 24 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 25 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 26 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 27 | * OTHER DEALINGS IN THE SOFTWARE. |
| 28 | */ |
| 29 | |
| 30 | #ifndef _DRM_FILE_H_ |
| 31 | #define _DRM_FILE_H_ |
| 32 | |
| 33 | #include <linux/types.h> |
| 34 | #include <linux/completion.h> |
Jani Nikula | 39e2367 | 2018-12-27 14:56:38 +0200 | [diff] [blame] | 35 | #include <linux/idr.h> |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 36 | |
| 37 | #include <uapi/drm/drm.h> |
| 38 | |
| 39 | #include <drm/drm_prime.h> |
| 40 | |
| 41 | struct dma_fence; |
| 42 | struct drm_file; |
| 43 | struct drm_device; |
Daniel Vetter | 3ed4351 | 2017-05-31 11:21:46 +0200 | [diff] [blame] | 44 | struct device; |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 45 | |
| 46 | /* |
| 47 | * FIXME: Not sure we want to have drm_minor here in the end, but to avoid |
| 48 | * header include loops we need it here for now. |
| 49 | */ |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 50 | |
Eric Anholt | c9ac371d | 2018-05-08 17:14:25 -0700 | [diff] [blame] | 51 | /* Note that the order of this enum is ABI (it determines |
| 52 | * /dev/dri/renderD* numbers). |
| 53 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 54 | enum drm_minor_type { |
| 55 | DRM_MINOR_PRIMARY, |
Eric Anholt | c9ac371d | 2018-05-08 17:14:25 -0700 | [diff] [blame] | 56 | DRM_MINOR_CONTROL, |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 57 | DRM_MINOR_RENDER, |
| 58 | }; |
| 59 | |
| 60 | /** |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 61 | * struct drm_minor - DRM device minor structure |
| 62 | * |
| 63 | * This structure represents a DRM minor number for device nodes in /dev. |
| 64 | * Entirely opaque to drivers and should never be inspected directly by drivers. |
| 65 | * Drivers instead should only interact with &struct drm_file and of course |
| 66 | * &struct drm_device, which is also where driver-private data and resources can |
| 67 | * be attached to. |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 68 | */ |
| 69 | struct drm_minor { |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 70 | /* private: */ |
| 71 | int index; /* Minor device number */ |
| 72 | int type; /* Control or render */ |
| 73 | struct device *kdev; /* Linux device */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 74 | struct drm_device *dev; |
| 75 | |
| 76 | struct dentry *debugfs_root; |
| 77 | |
| 78 | struct list_head debugfs_list; |
| 79 | struct mutex debugfs_lock; /* Protects debugfs_list. */ |
| 80 | }; |
| 81 | |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 82 | /** |
| 83 | * struct drm_pending_event - Event queued up for userspace to read |
| 84 | * |
| 85 | * This represents a DRM event. Drivers can use this as a generic completion |
| 86 | * mechanism, which supports kernel-internal &struct completion, &struct dma_fence |
| 87 | * and also the DRM-specific &struct drm_event delivery mechanism. |
| 88 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 89 | struct drm_pending_event { |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 90 | /** |
| 91 | * @completion: |
| 92 | * |
| 93 | * Optional pointer to a kernel internal completion signalled when |
| 94 | * drm_send_event() is called, useful to internally synchronize with |
| 95 | * nonblocking operations. |
| 96 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 97 | struct completion *completion; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 98 | |
| 99 | /** |
| 100 | * @completion_release: |
| 101 | * |
| 102 | * Optional callback currently only used by the atomic modeset helpers |
| 103 | * to clean up the reference count for the structure @completion is |
| 104 | * stored in. |
| 105 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 106 | void (*completion_release)(struct completion *completion); |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 107 | |
| 108 | /** |
| 109 | * @event: |
| 110 | * |
| 111 | * Pointer to the actual event that should be sent to userspace to be |
| 112 | * read using drm_read(). Can be optional, since nowadays events are |
| 113 | * also used to signal kernel internal threads with @completion or DMA |
| 114 | * transactions using @fence. |
| 115 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 116 | struct drm_event *event; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 117 | |
| 118 | /** |
| 119 | * @fence: |
| 120 | * |
| 121 | * Optional DMA fence to unblock other hardware transactions which |
| 122 | * depend upon the nonblocking DRM operation this event represents. |
| 123 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 124 | struct dma_fence *fence; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 125 | |
| 126 | /** |
| 127 | * @file_priv: |
| 128 | * |
| 129 | * &struct drm_file where @event should be delivered to. Only set when |
| 130 | * @event is set. |
| 131 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 132 | struct drm_file *file_priv; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 133 | |
| 134 | /** |
| 135 | * @link: |
| 136 | * |
| 137 | * Double-linked list to keep track of this event. Can be used by the |
| 138 | * driver up to the point when it calls drm_send_event(), after that |
| 139 | * this list entry is owned by the core for its own book-keeping. |
| 140 | */ |
| 141 | struct list_head link; |
| 142 | |
| 143 | /** |
| 144 | * @pending_link: |
| 145 | * |
| 146 | * Entry on &drm_file.pending_event_list, to keep track of all pending |
| 147 | * events for @file_priv, to allow correct unwinding of them when |
| 148 | * userspace closes the file before the event is delivered. |
| 149 | */ |
| 150 | struct list_head pending_link; |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 151 | }; |
| 152 | |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 153 | /** |
| 154 | * struct drm_file - DRM file private data |
| 155 | * |
| 156 | * This structure tracks DRM state per open file descriptor. |
| 157 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 158 | struct drm_file { |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 159 | /** |
| 160 | * @authenticated: |
| 161 | * |
| 162 | * Whether the client is allowed to submit rendering, which for legacy |
| 163 | * nodes means it must be authenticated. |
| 164 | * |
| 165 | * See also the :ref:`section on primary nodes and authentication |
| 166 | * <drm_primary_node>`. |
| 167 | */ |
Daniel Vetter | 078b7de | 2018-11-02 14:25:42 +0100 | [diff] [blame] | 168 | bool authenticated; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 169 | |
| 170 | /** |
| 171 | * @stereo_allowed: |
| 172 | * |
| 173 | * True when the client has asked us to expose stereo 3D mode flags. |
| 174 | */ |
Daniel Vetter | 078b7de | 2018-11-02 14:25:42 +0100 | [diff] [blame] | 175 | bool stereo_allowed; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 176 | |
| 177 | /** |
| 178 | * @universal_planes: |
| 179 | * |
| 180 | * True if client understands CRTC primary planes and cursor planes |
| 181 | * in the plane list. Automatically set when @atomic is set. |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 182 | */ |
Daniel Vetter | 078b7de | 2018-11-02 14:25:42 +0100 | [diff] [blame] | 183 | bool universal_planes; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 184 | |
| 185 | /** @atomic: True if client understands atomic properties. */ |
Daniel Vetter | 078b7de | 2018-11-02 14:25:42 +0100 | [diff] [blame] | 186 | bool atomic; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 187 | |
| 188 | /** |
Ankit Nautiyal | 7595bda | 2018-05-08 16:39:41 +0530 | [diff] [blame] | 189 | * @aspect_ratio_allowed: |
| 190 | * |
| 191 | * True, if client can handle picture aspect ratios, and has requested |
| 192 | * to pass this information along with the mode. |
| 193 | */ |
Daniel Vetter | 078b7de | 2018-11-02 14:25:42 +0100 | [diff] [blame] | 194 | bool aspect_ratio_allowed; |
Ankit Nautiyal | 7595bda | 2018-05-08 16:39:41 +0530 | [diff] [blame] | 195 | |
| 196 | /** |
Liviu Dudau | d67b6a2 | 2018-02-28 14:11:23 +0000 | [diff] [blame] | 197 | * @writeback_connectors: |
| 198 | * |
| 199 | * True if client understands writeback connectors |
| 200 | */ |
Daniel Vetter | 078b7de | 2018-11-02 14:25:42 +0100 | [diff] [blame] | 201 | bool writeback_connectors; |
Liviu Dudau | d67b6a2 | 2018-02-28 14:11:23 +0000 | [diff] [blame] | 202 | |
| 203 | /** |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 204 | * @is_master: |
| 205 | * |
| 206 | * This client is the creator of @master. Protected by struct |
| 207 | * &drm_device.master_mutex. |
| 208 | * |
| 209 | * See also the :ref:`section on primary nodes and authentication |
| 210 | * <drm_primary_node>`. |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 211 | */ |
Daniel Vetter | 078b7de | 2018-11-02 14:25:42 +0100 | [diff] [blame] | 212 | bool is_master; |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 213 | |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 214 | /** |
| 215 | * @master: |
| 216 | * |
| 217 | * Master this node is currently associated with. Only relevant if |
| 218 | * drm_is_primary_client() returns true. Note that this only |
| 219 | * matches &drm_device.master if the master is the currently active one. |
| 220 | * |
| 221 | * See also @authentication and @is_master and the :ref:`section on |
| 222 | * primary nodes and authentication <drm_primary_node>`. |
| 223 | */ |
| 224 | struct drm_master *master; |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 225 | |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 226 | /** @pid: Process that opened this file. */ |
| 227 | struct pid *pid; |
| 228 | |
| 229 | /** @magic: Authentication magic, see @authenticated. */ |
| 230 | drm_magic_t magic; |
| 231 | |
| 232 | /** |
| 233 | * @lhead: |
| 234 | * |
| 235 | * List of all open files of a DRM device, linked into |
| 236 | * &drm_device.filelist. Protected by &drm_device.filelist_mutex. |
| 237 | */ |
| 238 | struct list_head lhead; |
| 239 | |
| 240 | /** @minor: &struct drm_minor for this file. */ |
| 241 | struct drm_minor *minor; |
| 242 | |
| 243 | /** |
| 244 | * @object_idr: |
| 245 | * |
| 246 | * Mapping of mm object handles to object pointers. Used by the GEM |
| 247 | * subsystem. Protected by @table_lock. |
| 248 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 249 | struct idr object_idr; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 250 | |
| 251 | /** @table_lock: Protects @object_idr. */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 252 | spinlock_t table_lock; |
| 253 | |
Dave Airlie | e908342 | 2017-04-04 13:26:24 +1000 | [diff] [blame] | 254 | /** @syncobj_idr: Mapping of sync object handles to object pointers. */ |
| 255 | struct idr syncobj_idr; |
| 256 | /** @syncobj_table_lock: Protects @syncobj_idr. */ |
| 257 | spinlock_t syncobj_table_lock; |
| 258 | |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 259 | /** @filp: Pointer to the core file structure. */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 260 | struct file *filp; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 261 | |
| 262 | /** |
| 263 | * @driver_priv: |
| 264 | * |
| 265 | * Optional pointer for driver private data. Can be allocated in |
| 266 | * &drm_driver.open and should be freed in &drm_driver.postclose. |
| 267 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 268 | void *driver_priv; |
| 269 | |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 270 | /** |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 271 | * @fbs: |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 272 | * |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 273 | * List of &struct drm_framebuffer associated with this file, using the |
| 274 | * &drm_framebuffer.filp_head entry. |
| 275 | * |
| 276 | * Protected by @fbs_lock. Note that the @fbs list holds a reference on |
| 277 | * the framebuffer object to prevent it from untimely disappearing. |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 278 | */ |
| 279 | struct list_head fbs; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 280 | |
| 281 | /** @fbs_lock: Protects @fbs. */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 282 | struct mutex fbs_lock; |
| 283 | |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 284 | /** |
| 285 | * @blobs: |
| 286 | * |
| 287 | * User-created blob properties; this retains a reference on the |
| 288 | * property. |
| 289 | * |
| 290 | * Protected by @drm_mode_config.blob_lock; |
| 291 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 292 | struct list_head blobs; |
| 293 | |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 294 | /** @event_wait: Waitqueue for new events added to @event_list. */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 295 | wait_queue_head_t event_wait; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 296 | |
| 297 | /** |
| 298 | * @pending_event_list: |
| 299 | * |
| 300 | * List of pending &struct drm_pending_event, used to clean up pending |
| 301 | * events in case this file gets closed before the event is signalled. |
| 302 | * Uses the &drm_pending_event.pending_link entry. |
| 303 | * |
| 304 | * Protect by &drm_device.event_lock. |
| 305 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 306 | struct list_head pending_event_list; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 307 | |
| 308 | /** |
| 309 | * @event_list: |
| 310 | * |
| 311 | * List of &struct drm_pending_event, ready for delivery to userspace |
| 312 | * through drm_read(). Uses the &drm_pending_event.link entry. |
| 313 | * |
| 314 | * Protect by &drm_device.event_lock. |
| 315 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 316 | struct list_head event_list; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 317 | |
| 318 | /** |
| 319 | * @event_space: |
| 320 | * |
| 321 | * Available event space to prevent userspace from |
| 322 | * exhausting kernel memory. Currently limited to the fairly arbitrary |
| 323 | * value of 4KB. |
| 324 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 325 | int event_space; |
| 326 | |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 327 | /** @event_read_lock: Serializes drm_read(). */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 328 | struct mutex event_read_lock; |
| 329 | |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 330 | /** |
| 331 | * @prime: |
| 332 | * |
| 333 | * Per-file buffer caches used by the PRIME buffer sharing code. |
| 334 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 335 | struct drm_prime_file_private prime; |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 336 | |
| 337 | /* private: */ |
Dave Airlie | ee22f76 | 2019-04-23 10:01:50 +1000 | [diff] [blame] | 338 | #if IS_ENABLED(CONFIG_DRM_LEGACY) |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 339 | unsigned long lock_count; /* DRI1 legacy lock count */ |
Dave Airlie | ee22f76 | 2019-04-23 10:01:50 +1000 | [diff] [blame] | 340 | #endif |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 341 | }; |
| 342 | |
Daniel Vetter | b93658f | 2017-03-08 15:12:44 +0100 | [diff] [blame] | 343 | /** |
| 344 | * drm_is_primary_client - is this an open file of the primary node |
| 345 | * @file_priv: DRM file |
| 346 | * |
| 347 | * Returns true if this is an open file of the primary node, i.e. |
| 348 | * &drm_file.minor of @file_priv is a primary minor. |
| 349 | * |
| 350 | * See also the :ref:`section on primary nodes and authentication |
| 351 | * <drm_primary_node>`. |
| 352 | */ |
| 353 | static inline bool drm_is_primary_client(const struct drm_file *file_priv) |
| 354 | { |
| 355 | return file_priv->minor->type == DRM_MINOR_PRIMARY; |
| 356 | } |
| 357 | |
| 358 | /** |
| 359 | * drm_is_render_client - is this an open file of the render node |
| 360 | * @file_priv: DRM file |
| 361 | * |
| 362 | * Returns true if this is an open file of the render node, i.e. |
| 363 | * &drm_file.minor of @file_priv is a render minor. |
| 364 | * |
| 365 | * See also the :ref:`section on render nodes <drm_render_node>`. |
| 366 | */ |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 367 | static inline bool drm_is_render_client(const struct drm_file *file_priv) |
| 368 | { |
| 369 | return file_priv->minor->type == DRM_MINOR_RENDER; |
| 370 | } |
| 371 | |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 372 | int drm_open(struct inode *inode, struct file *filp); |
| 373 | ssize_t drm_read(struct file *filp, char __user *buffer, |
| 374 | size_t count, loff_t *offset); |
| 375 | int drm_release(struct inode *inode, struct file *filp); |
Al Viro | afc9a42 | 2017-07-03 06:39:46 -0400 | [diff] [blame] | 376 | __poll_t drm_poll(struct file *filp, struct poll_table_struct *wait); |
Daniel Vetter | a8f8b1d | 2017-03-08 15:12:42 +0100 | [diff] [blame] | 377 | int drm_event_reserve_init_locked(struct drm_device *dev, |
| 378 | struct drm_file *file_priv, |
| 379 | struct drm_pending_event *p, |
| 380 | struct drm_event *e); |
| 381 | int drm_event_reserve_init(struct drm_device *dev, |
| 382 | struct drm_file *file_priv, |
| 383 | struct drm_pending_event *p, |
| 384 | struct drm_event *e); |
| 385 | void drm_event_cancel_free(struct drm_device *dev, |
| 386 | struct drm_pending_event *p); |
| 387 | void drm_send_event_locked(struct drm_device *dev, struct drm_pending_event *e); |
| 388 | void drm_send_event(struct drm_device *dev, struct drm_pending_event *e); |
| 389 | |
| 390 | #endif /* _DRM_FILE_H_ */ |