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