Linux 3.16-rc2
[linux/fpc-iii.git] / include / drm / drm_agpsupport.h
blob86a02188074bcec037714fdb1ea293dfb4ae3ebe
1 #ifndef _DRM_AGPSUPPORT_H_
2 #define _DRM_AGPSUPPORT_H_
4 #include <linux/kernel.h>
5 #include <linux/mm.h>
6 #include <linux/mutex.h>
7 #include <linux/types.h>
8 #include <linux/agp_backend.h>
9 #include <drm/drmP.h>
11 #if __OS_HAS_AGP
13 void drm_free_agp(struct agp_memory * handle, int pages);
14 int drm_bind_agp(struct agp_memory * handle, unsigned int start);
15 int drm_unbind_agp(struct agp_memory * handle);
16 struct agp_memory *drm_agp_bind_pages(struct drm_device *dev,
17 struct page **pages,
18 unsigned long num_pages,
19 uint32_t gtt_offset,
20 uint32_t type);
22 struct drm_agp_head *drm_agp_init(struct drm_device *dev);
23 void drm_agp_clear(struct drm_device *dev);
24 int drm_agp_acquire(struct drm_device *dev);
25 int drm_agp_acquire_ioctl(struct drm_device *dev, void *data,
26 struct drm_file *file_priv);
27 int drm_agp_release(struct drm_device *dev);
28 int drm_agp_release_ioctl(struct drm_device *dev, void *data,
29 struct drm_file *file_priv);
30 int drm_agp_enable(struct drm_device *dev, struct drm_agp_mode mode);
31 int drm_agp_enable_ioctl(struct drm_device *dev, void *data,
32 struct drm_file *file_priv);
33 int drm_agp_info(struct drm_device *dev, struct drm_agp_info *info);
34 int drm_agp_info_ioctl(struct drm_device *dev, void *data,
35 struct drm_file *file_priv);
36 int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request);
37 int drm_agp_alloc_ioctl(struct drm_device *dev, void *data,
38 struct drm_file *file_priv);
39 int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request);
40 int drm_agp_free_ioctl(struct drm_device *dev, void *data,
41 struct drm_file *file_priv);
42 int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request);
43 int drm_agp_unbind_ioctl(struct drm_device *dev, void *data,
44 struct drm_file *file_priv);
45 int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request);
46 int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
47 struct drm_file *file_priv);
48 #else /* __OS_HAS_AGP */
50 static inline void drm_free_agp(struct agp_memory * handle, int pages)
54 static inline int drm_bind_agp(struct agp_memory * handle, unsigned int start)
56 return -ENODEV;
59 static inline int drm_unbind_agp(struct agp_memory * handle)
61 return -ENODEV;
64 static inline struct agp_memory *drm_agp_bind_pages(struct drm_device *dev,
65 struct page **pages,
66 unsigned long num_pages,
67 uint32_t gtt_offset,
68 uint32_t type)
70 return NULL;
73 static inline struct drm_agp_head *drm_agp_init(struct drm_device *dev)
75 return NULL;
78 static inline void drm_agp_clear(struct drm_device *dev)
82 static inline int drm_agp_acquire(struct drm_device *dev)
84 return -ENODEV;
87 static inline int drm_agp_acquire_ioctl(struct drm_device *dev, void *data,
88 struct drm_file *file_priv)
90 return -ENODEV;
93 static inline int drm_agp_release(struct drm_device *dev)
95 return -ENODEV;
98 static inline int drm_agp_release_ioctl(struct drm_device *dev, void *data,
99 struct drm_file *file_priv)
101 return -ENODEV;
104 static inline int drm_agp_enable(struct drm_device *dev,
105 struct drm_agp_mode mode)
107 return -ENODEV;
110 static inline int drm_agp_enable_ioctl(struct drm_device *dev, void *data,
111 struct drm_file *file_priv)
113 return -ENODEV;
116 static inline int drm_agp_info(struct drm_device *dev,
117 struct drm_agp_info *info)
119 return -ENODEV;
122 static inline int drm_agp_info_ioctl(struct drm_device *dev, void *data,
123 struct drm_file *file_priv)
125 return -ENODEV;
128 static inline int drm_agp_alloc(struct drm_device *dev,
129 struct drm_agp_buffer *request)
131 return -ENODEV;
134 static inline int drm_agp_alloc_ioctl(struct drm_device *dev, void *data,
135 struct drm_file *file_priv)
137 return -ENODEV;
140 static inline int drm_agp_free(struct drm_device *dev,
141 struct drm_agp_buffer *request)
143 return -ENODEV;
146 static inline int drm_agp_free_ioctl(struct drm_device *dev, void *data,
147 struct drm_file *file_priv)
149 return -ENODEV;
152 static inline int drm_agp_unbind(struct drm_device *dev,
153 struct drm_agp_binding *request)
155 return -ENODEV;
158 static inline int drm_agp_unbind_ioctl(struct drm_device *dev, void *data,
159 struct drm_file *file_priv)
161 return -ENODEV;
164 static inline int drm_agp_bind(struct drm_device *dev,
165 struct drm_agp_binding *request)
167 return -ENODEV;
170 static inline int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
171 struct drm_file *file_priv)
173 return -ENODEV;
175 #endif /* __OS_HAS_AGP */
177 #endif /* _DRM_AGPSUPPORT_H_ */