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) #ifndef __DRM_LEGACY_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #define __DRM_LEGACY_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Copyright (c) 2014 David Herrmann <dh.herrmann@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  * Permission is hereby granted, free of charge, to any person obtaining a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  * copy of this software and associated documentation files (the "Software"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  * to deal in the Software without restriction, including without limitation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)  * and/or sell copies of the Software, and to permit persons to whom the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)  * Software is furnished to do so, subject to the following conditions:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)  * The above copyright notice and this permission notice shall be included in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)  * all copies or substantial portions of the Software.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17)  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19)  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23)  * OTHER DEALINGS IN THE SOFTWARE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27)  * This file contains legacy interfaces that modern drm drivers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28)  * should no longer be using. They cannot be removed as legacy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29)  * drivers use them, and removing them are API breaks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) #include <linux/list.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) #include <drm/drm.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) #include <drm/drm_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) #include <drm/drm_legacy.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) struct agp_memory;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) struct drm_device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) struct drm_file;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) struct drm_buf_desc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)  * Generic DRM Contexts
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) #define DRM_KERNEL_CONTEXT		0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) #define DRM_RESERVED_CONTEXTS		1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) void drm_legacy_ctxbitmap_init(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) void drm_legacy_ctxbitmap_cleanup(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) void drm_legacy_ctxbitmap_flush(struct drm_device *dev, struct drm_file *file);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) static inline void drm_legacy_ctxbitmap_init(struct drm_device *dev) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) static inline void drm_legacy_ctxbitmap_cleanup(struct drm_device *dev) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) static inline void drm_legacy_ctxbitmap_flush(struct drm_device *dev, struct drm_file *file) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) void drm_legacy_ctxbitmap_free(struct drm_device *dev, int ctx_handle);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) int drm_legacy_resctx(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) int drm_legacy_addctx(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) int drm_legacy_getctx(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) int drm_legacy_switchctx(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) int drm_legacy_newctx(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) int drm_legacy_rmctx(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) int drm_legacy_setsareactx(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) int drm_legacy_getsareactx(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)  * Generic Buffer Management
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) #define DRM_MAP_HASH_OFFSET 0x10000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) static inline int drm_legacy_create_map_hash(struct drm_device *dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	return drm_ht_create(&dev->map_hash, 12);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) static inline void drm_legacy_remove_map_hash(struct drm_device *dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	drm_ht_remove(&dev->map_hash);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) static inline int drm_legacy_create_map_hash(struct drm_device *dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) static inline void drm_legacy_remove_map_hash(struct drm_device *dev) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) int drm_legacy_getmap_ioctl(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 			    struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) int drm_legacy_addmap_ioctl(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) int drm_legacy_rmmap_ioctl(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) int drm_legacy_addbufs(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) int drm_legacy_infobufs(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) int drm_legacy_markbufs(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) int drm_legacy_freebufs(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) int drm_legacy_mapbufs(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) int drm_legacy_dma_ioctl(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) int __drm_legacy_infobufs(struct drm_device *, void *, int *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 			  int (*)(void *, int, struct drm_buf_entry *));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) int __drm_legacy_mapbufs(struct drm_device *, void *, int *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 			  void __user **,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 			  int (*)(void *, int, unsigned long, struct drm_buf *),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 			  struct drm_file *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) void drm_legacy_master_rmmaps(struct drm_device *dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 			      struct drm_master *master);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) void drm_legacy_rmmaps(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) static inline void drm_legacy_master_rmmaps(struct drm_device *dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 					    struct drm_master *master) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) static inline void drm_legacy_rmmaps(struct drm_device *dev) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) #if IS_ENABLED(CONFIG_DRM_VM) && IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) void drm_legacy_vma_flush(struct drm_device *d);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) static inline void drm_legacy_vma_flush(struct drm_device *d)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	/* do nothing */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)  * AGP Support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) struct drm_agp_mem {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	unsigned long handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	struct agp_memory *memory;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	unsigned long bound;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	int pages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	struct list_head head;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) /* drm_lock.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) int drm_legacy_lock(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) int drm_legacy_unlock(struct drm_device *d, void *v, struct drm_file *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) void drm_legacy_lock_release(struct drm_device *dev, struct file *filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) static inline void drm_legacy_lock_release(struct drm_device *dev, struct file *filp) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) /* DMA support */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) int drm_legacy_dma_setup(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) void drm_legacy_dma_takedown(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) static inline int drm_legacy_dma_setup(struct drm_device *dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) void drm_legacy_free_buffer(struct drm_device *dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 			    struct drm_buf * buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) void drm_legacy_reclaim_buffers(struct drm_device *dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 				struct drm_file *filp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) static inline void drm_legacy_reclaim_buffers(struct drm_device *dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 					      struct drm_file *filp) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) /* Scatter Gather Support */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) void drm_legacy_sg_cleanup(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) int drm_legacy_sg_alloc(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 			struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) int drm_legacy_sg_free(struct drm_device *dev, void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 		       struct drm_file *file_priv);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) void drm_legacy_init_members(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) void drm_legacy_destroy_members(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) void drm_legacy_dev_reinit(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) int drm_legacy_setup(struct drm_device * dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) static inline void drm_legacy_init_members(struct drm_device *dev) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) static inline void drm_legacy_destroy_members(struct drm_device *dev) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) static inline void drm_legacy_dev_reinit(struct drm_device *dev) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) static inline int drm_legacy_setup(struct drm_device * dev) { return 0; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) void drm_legacy_lock_master_cleanup(struct drm_device *dev, struct drm_master *master);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) static inline void drm_legacy_lock_master_cleanup(struct drm_device *dev, struct drm_master *master) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) #if IS_ENABLED(CONFIG_DRM_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) void drm_master_legacy_init(struct drm_master *master);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) static inline void drm_master_legacy_init(struct drm_master *master) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) #endif /* __DRM_LEGACY_H__ */