Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2)  * Copyright © 2014 Intel Corporation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  *   Daniel Vetter <daniel.vetter@ffwll.ch>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Permission is hereby granted, free of charge, to any person obtaining a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  * copy of this software and associated documentation files (the "Software"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  * to deal in the Software without restriction, including without limitation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  * and/or sell copies of the Software, and to permit persons to whom the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)  * Software is furnished to do so, subject to the following conditions:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)  * The above copyright notice and this permission notice shall be included in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)  * all copies or substantial portions of the Software.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17)  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19)  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)  * OTHER DEALINGS IN THE SOFTWARE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #include <linux/kthread.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) #include <drm/drm_ioctl.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) #include <drm/drm_vblank.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #define DRM_IF_MAJOR 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) #define DRM_IF_MINOR 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) #define DRM_IF_VERSION(maj, min) (maj << 16 | min)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) struct dentry;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) struct dma_buf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) struct drm_connector;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) struct drm_crtc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) struct drm_framebuffer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) struct drm_gem_object;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) struct drm_master;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) struct drm_minor;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) struct drm_prime_file_private;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) struct drm_printer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) struct drm_vblank_crtc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) /* drm_file.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) extern struct mutex drm_global_mutex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) bool drm_dev_needs_global_mutex(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) struct drm_file *drm_file_alloc(struct drm_minor *minor);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) void drm_file_free(struct drm_file *file);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) void drm_lastclose(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) #ifdef CONFIG_PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) /* drm_pci.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) int drm_irq_by_busid(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		     struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) void drm_pci_agp_destroy(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) static inline int drm_irq_by_busid(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 				   struct drm_file *file_priv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) static inline void drm_pci_agp_destroy(struct drm_device *dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) static inline int drm_pci_set_busid(struct drm_device *dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 				    struct drm_master *master)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) /* drm_prime.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 				 struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 				 struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) void drm_prime_remove_buf_handle(struct drm_prime_file_private *prime_fpriv,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 				 uint32_t handle);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) /* drm_drv.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) struct drm_minor *drm_minor_acquire(unsigned int minor_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) void drm_minor_release(struct drm_minor *minor);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) /* drm_managed.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) void drm_managed_release(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) void drmm_add_final_kfree(struct drm_device *dev, void *container);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) /* drm_vblank.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) static inline bool drm_vblank_passed(u64 seq, u64 ref)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	return (seq - ref) <= (1 << 23);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) void drm_vblank_disable_and_save(struct drm_device *dev, unsigned int pipe);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) int drm_vblank_get(struct drm_device *dev, unsigned int pipe);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) void drm_vblank_put(struct drm_device *dev, unsigned int pipe);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) u64 drm_vblank_count(struct drm_device *dev, unsigned int pipe);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) /* drm_vblank_work.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) static inline void drm_vblank_flush_worker(struct drm_vblank_crtc *vblank)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	kthread_flush_worker(vblank->worker);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) static inline void drm_vblank_destroy_worker(struct drm_vblank_crtc *vblank)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	kthread_destroy_worker(vblank->worker);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) int drm_vblank_worker_init(struct drm_vblank_crtc *vblank);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) void drm_vblank_cancel_pending_works(struct drm_vblank_crtc *vblank);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) void drm_handle_vblank_works(struct drm_vblank_crtc *vblank);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) /* IOCTLS */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) int drm_wait_vblank_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 			  struct drm_file *filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) int drm_legacy_modeset_ctl_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 				 struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) /* drm_irq.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) /* IOCTLS */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) int drm_legacy_irq_control(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 			   struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) int drm_crtc_get_sequence_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 				struct drm_file *filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) int drm_crtc_queue_sequence_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 				  struct drm_file *filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) /* drm_auth.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) int drm_getmagic(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 		 struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) int drm_authmagic(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 		  struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) int drm_setmaster_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 			struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 			 struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) int drm_master_open(struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) void drm_master_release(struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) bool drm_master_internal_acquire(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) void drm_master_internal_release(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) /* drm_sysfs.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) extern struct class *drm_class;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) int drm_sysfs_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) void drm_sysfs_destroy(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) struct device *drm_sysfs_minor_alloc(struct drm_minor *minor);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) int drm_sysfs_connector_add(struct drm_connector *connector);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) void drm_sysfs_connector_remove(struct drm_connector *connector);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) void drm_sysfs_lease_event(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) /* drm_gem.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) struct drm_gem_object;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) int drm_gem_init(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) int drm_gem_handle_create_tail(struct drm_file *file_priv,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 			       struct drm_gem_object *obj,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 			       u32 *handlep);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) int drm_gem_close_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 			struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) int drm_gem_flink_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 			struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) int drm_gem_open_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 		       struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) void drm_gem_open(struct drm_device *dev, struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) void drm_gem_release(struct drm_device *dev, struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) void drm_gem_print_info(struct drm_printer *p, unsigned int indent,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 			const struct drm_gem_object *obj);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) int drm_gem_pin(struct drm_gem_object *obj);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) void drm_gem_unpin(struct drm_gem_object *obj);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) void *drm_gem_vmap(struct drm_gem_object *obj);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) void drm_gem_vunmap(struct drm_gem_object *obj, void *vaddr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) /* drm_debugfs.c drm_debugfs_crc.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) #if defined(CONFIG_DEBUG_FS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) int drm_debugfs_init(struct drm_minor *minor, int minor_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		     struct dentry *root);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) void drm_debugfs_cleanup(struct drm_minor *minor);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) void drm_debugfs_connector_add(struct drm_connector *connector);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) void drm_debugfs_connector_remove(struct drm_connector *connector);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) void drm_debugfs_crtc_add(struct drm_crtc *crtc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) void drm_debugfs_crtc_remove(struct drm_crtc *crtc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) void drm_debugfs_crtc_crc_add(struct drm_crtc *crtc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 				   struct dentry *root)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) static inline void drm_debugfs_cleanup(struct drm_minor *minor)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) static inline void drm_debugfs_connector_add(struct drm_connector *connector)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) static inline void drm_debugfs_connector_remove(struct drm_connector *connector)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) static inline void drm_debugfs_crtc_add(struct drm_crtc *crtc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) static inline void drm_debugfs_crtc_remove(struct drm_crtc *crtc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) static inline void drm_debugfs_crtc_crc_add(struct drm_crtc *crtc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) drm_ioctl_t drm_version;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) drm_ioctl_t drm_getunique;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) drm_ioctl_t drm_getclient;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) /* drm_syncobj.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) void drm_syncobj_open(struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) void drm_syncobj_release(struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) int drm_syncobj_create_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 			     struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) int drm_syncobj_destroy_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 			      struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) int drm_syncobj_handle_to_fd_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 				   struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) int drm_syncobj_fd_to_handle_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 				   struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) int drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 			       struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) int drm_syncobj_wait_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 			   struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) int drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 				    struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) int drm_syncobj_reset_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 			    struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) int drm_syncobj_signal_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 			     struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) int drm_syncobj_timeline_signal_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 				      struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) int drm_syncobj_query_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 			    struct drm_file *file_private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) /* drm_framebuffer.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) void drm_framebuffer_print_info(struct drm_printer *p, unsigned int indent,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 				const struct drm_framebuffer *fb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) void drm_framebuffer_debugfs_init(struct drm_minor *minor);