blob: 2b9a94f679eda0a618ca657de6995f30a41f8802 [file] [log] [blame]
Daniel Vetter18882992014-09-10 08:16:10 +02001/*
2 * Copyright © 2014 Intel Corporation
3 * Daniel Vetter <daniel.vetter@ffwll.ch>
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
22 */
23
Daniel Vetter67d0ec42014-09-10 12:43:53 +020024/* drm_irq.c */
Daniel Vetter18882992014-09-10 08:16:10 +020025extern unsigned int drm_timestamp_monotonic;
Daniel Vetter67d0ec42014-09-10 12:43:53 +020026
27/* drm_fops.c */
Daniel Vetter44af3f52014-09-10 12:43:54 +020028extern struct mutex drm_global_mutex;
Daniel Vetter68dfbeb2016-04-26 19:29:35 +020029void drm_lastclose(struct drm_device *dev);
Daniel Vetter67d0ec42014-09-10 12:43:53 +020030
31/* drm_pci.c */
32int drm_pci_set_unique(struct drm_device *dev,
33 struct drm_master *master,
34 struct drm_unique *u);
35int drm_irq_by_busid(struct drm_device *dev, void *data,
36 struct drm_file *file_priv);
37
Daniel Vetter67d0ec42014-09-10 12:43:53 +020038/* drm_prime.c */
39int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
40 struct drm_file *file_priv);
41int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data,
42 struct drm_file *file_priv);
43
44void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv);
45void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv);
46void drm_prime_remove_buf_handle_locked(struct drm_prime_file_private *prime_fpriv,
47 struct dma_buf *dma_buf);
48
49/* drm_info.c */
50int drm_name_info(struct seq_file *m, void *data);
Daniel Vetter67d0ec42014-09-10 12:43:53 +020051int drm_clients_info(struct seq_file *m, void* data);
52int drm_gem_name_info(struct seq_file *m, void *data);
53
54/* drm_irq.c */
55int drm_control(struct drm_device *dev, void *data,
56 struct drm_file *file_priv);
Daniel Vettere7f0a882014-09-23 15:46:51 +020057int drm_modeset_ctl(struct drm_device *dev, void *data,
58 struct drm_file *file_priv);
Daniel Vetter67d0ec42014-09-10 12:43:53 +020059
60/* drm_auth.c */
61int drm_getmagic(struct drm_device *dev, void *data,
62 struct drm_file *file_priv);
63int drm_authmagic(struct drm_device *dev, void *data,
64 struct drm_file *file_priv);
Daniel Vetter6548f4e2016-06-14 20:50:59 +020065int drm_setmaster_ioctl(struct drm_device *dev, void *data,
66 struct drm_file *file_priv);
67int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
68 struct drm_file *file_priv);
Daniel Vetter2cbae7e2016-06-14 20:51:00 +020069int drm_master_open(struct drm_file *file_priv);
Daniel Vetter67d0ec42014-09-10 12:43:53 +020070
71/* drm_sysfs.c */
Daniel Vetter00285be2014-09-10 12:43:59 +020072extern struct class *drm_class;
73
David Herrmannfcc90212015-09-09 14:21:30 +020074int drm_sysfs_init(void);
Daniel Vetter67d0ec42014-09-10 12:43:53 +020075void drm_sysfs_destroy(void);
76struct device *drm_sysfs_minor_alloc(struct drm_minor *minor);
77int drm_sysfs_connector_add(struct drm_connector *connector);
78void drm_sysfs_connector_remove(struct drm_connector *connector);
79
80/* drm_gem.c */
81int drm_gem_init(struct drm_device *dev);
82void drm_gem_destroy(struct drm_device *dev);
83int drm_gem_handle_create_tail(struct drm_file *file_priv,
84 struct drm_gem_object *obj,
85 u32 *handlep);
86int drm_gem_close_ioctl(struct drm_device *dev, void *data,
87 struct drm_file *file_priv);
88int drm_gem_flink_ioctl(struct drm_device *dev, void *data,
89 struct drm_file *file_priv);
90int drm_gem_open_ioctl(struct drm_device *dev, void *data,
91 struct drm_file *file_priv);
92void drm_gem_open(struct drm_device *dev, struct drm_file *file_private);
93void drm_gem_release(struct drm_device *dev, struct drm_file *file_private);
Daniel Vettere7f0a882014-09-23 15:46:51 +020094
Daniel Vetterc2611032014-09-23 15:46:52 +020095/* drm_debugfs.c */
96#if defined(CONFIG_DEBUG_FS)
97int drm_debugfs_init(struct drm_minor *minor, int minor_id,
98 struct dentry *root);
99int drm_debugfs_cleanup(struct drm_minor *minor);
100int drm_debugfs_connector_add(struct drm_connector *connector);
101void drm_debugfs_connector_remove(struct drm_connector *connector);
102#else
103static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id,
104 struct dentry *root)
105{
106 return 0;
107}
108
109static inline int drm_debugfs_cleanup(struct drm_minor *minor)
110{
111 return 0;
112}
113
114static inline int drm_debugfs_connector_add(struct drm_connector *connector)
115{
116 return 0;
117}
118static inline void drm_debugfs_connector_remove(struct drm_connector *connector)
119{
120}
121#endif