| .. | .. |
|---|
| 32 | 32 | |
|---|
| 33 | 33 | #include <linux/types.h> |
|---|
| 34 | 34 | #include <linux/completion.h> |
|---|
| 35 | +#include <linux/idr.h> |
|---|
| 35 | 36 | |
|---|
| 36 | 37 | #include <uapi/drm/drm.h> |
|---|
| 37 | 38 | |
|---|
| .. | .. |
|---|
| 41 | 42 | struct drm_file; |
|---|
| 42 | 43 | struct drm_device; |
|---|
| 43 | 44 | struct device; |
|---|
| 45 | +struct file; |
|---|
| 44 | 46 | |
|---|
| 45 | 47 | /* |
|---|
| 46 | 48 | * FIXME: Not sure we want to have drm_minor here in the end, but to avoid |
|---|
| .. | .. |
|---|
| 200 | 202 | bool writeback_connectors; |
|---|
| 201 | 203 | |
|---|
| 202 | 204 | /** |
|---|
| 205 | + * @was_master: |
|---|
| 206 | + * |
|---|
| 207 | + * This client has or had, master capability. Protected by struct |
|---|
| 208 | + * &drm_device.master_mutex. |
|---|
| 209 | + * |
|---|
| 210 | + * This is used to ensure that CAP_SYS_ADMIN is not enforced, if the |
|---|
| 211 | + * client is or was master in the past. |
|---|
| 212 | + */ |
|---|
| 213 | + bool was_master; |
|---|
| 214 | + |
|---|
| 215 | + /** |
|---|
| 203 | 216 | * @is_master: |
|---|
| 204 | 217 | * |
|---|
| 205 | 218 | * This client is the creator of @master. Protected by struct |
|---|
| .. | .. |
|---|
| 334 | 347 | struct drm_prime_file_private prime; |
|---|
| 335 | 348 | |
|---|
| 336 | 349 | /* private: */ |
|---|
| 350 | +#if IS_ENABLED(CONFIG_DRM_LEGACY) |
|---|
| 337 | 351 | unsigned long lock_count; /* DRI1 legacy lock count */ |
|---|
| 352 | +#endif |
|---|
| 338 | 353 | }; |
|---|
| 339 | 354 | |
|---|
| 340 | 355 | /** |
|---|
| .. | .. |
|---|
| 370 | 385 | ssize_t drm_read(struct file *filp, char __user *buffer, |
|---|
| 371 | 386 | size_t count, loff_t *offset); |
|---|
| 372 | 387 | int drm_release(struct inode *inode, struct file *filp); |
|---|
| 388 | +int drm_release_noglobal(struct inode *inode, struct file *filp); |
|---|
| 373 | 389 | __poll_t drm_poll(struct file *filp, struct poll_table_struct *wait); |
|---|
| 374 | 390 | int drm_event_reserve_init_locked(struct drm_device *dev, |
|---|
| 375 | 391 | struct drm_file *file_priv, |
|---|
| .. | .. |
|---|
| 383 | 399 | struct drm_pending_event *p); |
|---|
| 384 | 400 | void drm_send_event_locked(struct drm_device *dev, struct drm_pending_event *e); |
|---|
| 385 | 401 | void drm_send_event(struct drm_device *dev, struct drm_pending_event *e); |
|---|
| 402 | +void drm_send_event_timestamp_locked(struct drm_device *dev, |
|---|
| 403 | + struct drm_pending_event *e, |
|---|
| 404 | + ktime_t timestamp); |
|---|
| 405 | + |
|---|
| 406 | +struct file *mock_drm_getfile(struct drm_minor *minor, unsigned int flags); |
|---|
| 407 | + |
|---|
| 408 | +#ifdef CONFIG_MMU |
|---|
| 409 | +struct drm_vma_offset_manager; |
|---|
| 410 | +unsigned long drm_get_unmapped_area(struct file *file, |
|---|
| 411 | + unsigned long uaddr, unsigned long len, |
|---|
| 412 | + unsigned long pgoff, unsigned long flags, |
|---|
| 413 | + struct drm_vma_offset_manager *mgr); |
|---|
| 414 | +#endif /* CONFIG_MMU */ |
|---|
| 415 | + |
|---|
| 386 | 416 | |
|---|
| 387 | 417 | #endif /* _DRM_FILE_H_ */ |
|---|