hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/include/drm/drm_file.h
....@@ -32,6 +32,7 @@
3232
3333 #include <linux/types.h>
3434 #include <linux/completion.h>
35
+#include <linux/idr.h>
3536
3637 #include <uapi/drm/drm.h>
3738
....@@ -41,6 +42,7 @@
4142 struct drm_file;
4243 struct drm_device;
4344 struct device;
45
+struct file;
4446
4547 /*
4648 * FIXME: Not sure we want to have drm_minor here in the end, but to avoid
....@@ -200,6 +202,17 @@
200202 bool writeback_connectors;
201203
202204 /**
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
+ /**
203216 * @is_master:
204217 *
205218 * This client is the creator of @master. Protected by struct
....@@ -334,7 +347,9 @@
334347 struct drm_prime_file_private prime;
335348
336349 /* private: */
350
+#if IS_ENABLED(CONFIG_DRM_LEGACY)
337351 unsigned long lock_count; /* DRI1 legacy lock count */
352
+#endif
338353 };
339354
340355 /**
....@@ -370,6 +385,7 @@
370385 ssize_t drm_read(struct file *filp, char __user *buffer,
371386 size_t count, loff_t *offset);
372387 int drm_release(struct inode *inode, struct file *filp);
388
+int drm_release_noglobal(struct inode *inode, struct file *filp);
373389 __poll_t drm_poll(struct file *filp, struct poll_table_struct *wait);
374390 int drm_event_reserve_init_locked(struct drm_device *dev,
375391 struct drm_file *file_priv,
....@@ -383,5 +399,19 @@
383399 struct drm_pending_event *p);
384400 void drm_send_event_locked(struct drm_device *dev, struct drm_pending_event *e);
385401 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
+
386416
387417 #endif /* _DRM_FILE_H_ */