xref: /linux/include/drm/drm_lease.h (revision 90d32e92011eaae8e70a9169b4e7acf4ca8f9d3a)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright © 2017 Keith Packard <keithp@keithp.com>
4  */
5 
6 #ifndef _DRM_LEASE_H_
7 #define _DRM_LEASE_H_
8 
9 #include <linux/types.h>
10 
11 struct drm_file;
12 struct drm_device;
13 struct drm_master;
14 
15 struct drm_master *drm_lease_owner(struct drm_master *master);
16 
17 void drm_lease_destroy(struct drm_master *lessee);
18 
19 bool drm_lease_held(struct drm_file *file_priv, int id);
20 
21 bool _drm_lease_held(struct drm_file *file_priv, int id);
22 
23 void drm_lease_revoke(struct drm_master *master);
24 
25 uint32_t drm_lease_filter_crtcs(struct drm_file *file_priv, uint32_t crtcs);
26 
27 int drm_mode_create_lease_ioctl(struct drm_device *dev,
28 				void *data, struct drm_file *file_priv);
29 
30 int drm_mode_list_lessees_ioctl(struct drm_device *dev,
31 				void *data, struct drm_file *file_priv);
32 
33 int drm_mode_get_lease_ioctl(struct drm_device *dev,
34 			     void *data, struct drm_file *file_priv);
35 
36 int drm_mode_revoke_lease_ioctl(struct drm_device *dev,
37 				void *data, struct drm_file *file_priv);
38 
39 #endif /* _DRM_LEASE_H_ */
40