~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/drm/drm_agpsupport.h

Version: ~ [ linux-5.11-rc3 ] ~ [ linux-5.10.7 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.89 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.167 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.215 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.251 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.251 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _DRM_AGPSUPPORT_H_
  3 #define _DRM_AGPSUPPORT_H_
  4 
  5 #include <linux/agp_backend.h>
  6 #include <linux/kernel.h>
  7 #include <linux/list.h>
  8 #include <linux/mm.h>
  9 #include <linux/mutex.h>
 10 #include <linux/types.h>
 11 #include <uapi/drm/drm.h>
 12 
 13 struct drm_device;
 14 struct drm_file;
 15 
 16 struct drm_agp_head {
 17         struct agp_kern_info agp_info;
 18         struct list_head memory;
 19         unsigned long mode;
 20         struct agp_bridge_data *bridge;
 21         int enabled;
 22         int acquired;
 23         unsigned long base;
 24         int agp_mtrr;
 25         int cant_use_aperture;
 26         unsigned long page_mask;
 27 };
 28 
 29 #if IS_ENABLED(CONFIG_AGP)
 30 
 31 void drm_free_agp(struct agp_memory * handle, int pages);
 32 int drm_bind_agp(struct agp_memory * handle, unsigned int start);
 33 int drm_unbind_agp(struct agp_memory * handle);
 34 struct agp_memory *drm_agp_bind_pages(struct drm_device *dev,
 35                                 struct page **pages,
 36                                 unsigned long num_pages,
 37                                 uint32_t gtt_offset,
 38                                 uint32_t type);
 39 
 40 struct drm_agp_head *drm_agp_init(struct drm_device *dev);
 41 void drm_legacy_agp_clear(struct drm_device *dev);
 42 int drm_agp_acquire(struct drm_device *dev);
 43 int drm_agp_acquire_ioctl(struct drm_device *dev, void *data,
 44                           struct drm_file *file_priv);
 45 int drm_agp_release(struct drm_device *dev);
 46 int drm_agp_release_ioctl(struct drm_device *dev, void *data,
 47                           struct drm_file *file_priv);
 48 int drm_agp_enable(struct drm_device *dev, struct drm_agp_mode mode);
 49 int drm_agp_enable_ioctl(struct drm_device *dev, void *data,
 50                          struct drm_file *file_priv);
 51 int drm_agp_info(struct drm_device *dev, struct drm_agp_info *info);
 52 int drm_agp_info_ioctl(struct drm_device *dev, void *data,
 53                        struct drm_file *file_priv);
 54 int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request);
 55 int drm_agp_alloc_ioctl(struct drm_device *dev, void *data,
 56                         struct drm_file *file_priv);
 57 int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request);
 58 int drm_agp_free_ioctl(struct drm_device *dev, void *data,
 59                        struct drm_file *file_priv);
 60 int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request);
 61 int drm_agp_unbind_ioctl(struct drm_device *dev, void *data,
 62                          struct drm_file *file_priv);
 63 int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request);
 64 int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
 65                        struct drm_file *file_priv);
 66 
 67 #else /* CONFIG_AGP */
 68 
 69 static inline void drm_free_agp(struct agp_memory * handle, int pages)
 70 {
 71 }
 72 
 73 static inline int drm_bind_agp(struct agp_memory * handle, unsigned int start)
 74 {
 75         return -ENODEV;
 76 }
 77 
 78 static inline int drm_unbind_agp(struct agp_memory * handle)
 79 {
 80         return -ENODEV;
 81 }
 82 
 83 static inline struct agp_memory *drm_agp_bind_pages(struct drm_device *dev,
 84                                               struct page **pages,
 85                                               unsigned long num_pages,
 86                                               uint32_t gtt_offset,
 87                                               uint32_t type)
 88 {
 89         return NULL;
 90 }
 91 
 92 static inline struct drm_agp_head *drm_agp_init(struct drm_device *dev)
 93 {
 94         return NULL;
 95 }
 96 
 97 static inline void drm_legacy_agp_clear(struct drm_device *dev)
 98 {
 99 }
100 
101 static inline int drm_agp_acquire(struct drm_device *dev)
102 {
103         return -ENODEV;
104 }
105 
106 static inline int drm_agp_release(struct drm_device *dev)
107 {
108         return -ENODEV;
109 }
110 
111 static inline int drm_agp_enable(struct drm_device *dev,
112                                  struct drm_agp_mode mode)
113 {
114         return -ENODEV;
115 }
116 
117 static inline int drm_agp_info(struct drm_device *dev,
118                                struct drm_agp_info *info)
119 {
120         return -ENODEV;
121 }
122 
123 static inline int drm_agp_alloc(struct drm_device *dev,
124                                 struct drm_agp_buffer *request)
125 {
126         return -ENODEV;
127 }
128 
129 static inline int drm_agp_free(struct drm_device *dev,
130                                struct drm_agp_buffer *request)
131 {
132         return -ENODEV;
133 }
134 
135 static inline int drm_agp_unbind(struct drm_device *dev,
136                                  struct drm_agp_binding *request)
137 {
138         return -ENODEV;
139 }
140 
141 static inline int drm_agp_bind(struct drm_device *dev,
142                                struct drm_agp_binding *request)
143 {
144         return -ENODEV;
145 }
146 
147 #endif /* CONFIG_AGP */
148 
149 #endif /* _DRM_AGPSUPPORT_H_ */
150 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp