diff options
Diffstat (limited to 'include/drm/drm_agpsupport.h')
-rw-r--r-- | include/drm/drm_agpsupport.h | 57 |
1 files changed, 3 insertions, 54 deletions
diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h index 055dc058d147..193ef19dfc5c 100644 --- a/include/drm/drm_agpsupport.h +++ b/include/drm/drm_agpsupport.h | |||
@@ -12,9 +12,6 @@ | |||
12 | struct drm_device; | 12 | struct drm_device; |
13 | struct drm_file; | 13 | struct drm_file; |
14 | 14 | ||
15 | #define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && \ | ||
16 | defined(MODULE))) | ||
17 | |||
18 | struct drm_agp_head { | 15 | struct drm_agp_head { |
19 | struct agp_kern_info agp_info; | 16 | struct agp_kern_info agp_info; |
20 | struct list_head memory; | 17 | struct list_head memory; |
@@ -28,7 +25,7 @@ struct drm_agp_head { | |||
28 | unsigned long page_mask; | 25 | unsigned long page_mask; |
29 | }; | 26 | }; |
30 | 27 | ||
31 | #if __OS_HAS_AGP | 28 | #if IS_ENABLED(CONFIG_AGP) |
32 | 29 | ||
33 | void drm_free_agp(struct agp_memory * handle, int pages); | 30 | void drm_free_agp(struct agp_memory * handle, int pages); |
34 | int drm_bind_agp(struct agp_memory * handle, unsigned int start); | 31 | int drm_bind_agp(struct agp_memory * handle, unsigned int start); |
@@ -66,7 +63,7 @@ int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request); | |||
66 | int drm_agp_bind_ioctl(struct drm_device *dev, void *data, | 63 | int drm_agp_bind_ioctl(struct drm_device *dev, void *data, |
67 | struct drm_file *file_priv); | 64 | struct drm_file *file_priv); |
68 | 65 | ||
69 | #else /* __OS_HAS_AGP */ | 66 | #else /* CONFIG_AGP */ |
70 | 67 | ||
71 | static inline void drm_free_agp(struct agp_memory * handle, int pages) | 68 | static inline void drm_free_agp(struct agp_memory * handle, int pages) |
72 | { | 69 | { |
@@ -105,95 +102,47 @@ static inline int drm_agp_acquire(struct drm_device *dev) | |||
105 | return -ENODEV; | 102 | return -ENODEV; |
106 | } | 103 | } |
107 | 104 | ||
108 | static inline int drm_agp_acquire_ioctl(struct drm_device *dev, void *data, | ||
109 | struct drm_file *file_priv) | ||
110 | { | ||
111 | return -ENODEV; | ||
112 | } | ||
113 | |||
114 | static inline int drm_agp_release(struct drm_device *dev) | 105 | static inline int drm_agp_release(struct drm_device *dev) |
115 | { | 106 | { |
116 | return -ENODEV; | 107 | return -ENODEV; |
117 | } | 108 | } |
118 | 109 | ||
119 | static inline int drm_agp_release_ioctl(struct drm_device *dev, void *data, | ||
120 | struct drm_file *file_priv) | ||
121 | { | ||
122 | return -ENODEV; | ||
123 | } | ||
124 | |||
125 | static inline int drm_agp_enable(struct drm_device *dev, | 110 | static inline int drm_agp_enable(struct drm_device *dev, |
126 | struct drm_agp_mode mode) | 111 | struct drm_agp_mode mode) |
127 | { | 112 | { |
128 | return -ENODEV; | 113 | return -ENODEV; |
129 | } | 114 | } |
130 | 115 | ||
131 | static inline int drm_agp_enable_ioctl(struct drm_device *dev, void *data, | ||
132 | struct drm_file *file_priv) | ||
133 | { | ||
134 | return -ENODEV; | ||
135 | } | ||
136 | |||
137 | static inline int drm_agp_info(struct drm_device *dev, | 116 | static inline int drm_agp_info(struct drm_device *dev, |
138 | struct drm_agp_info *info) | 117 | struct drm_agp_info *info) |
139 | { | 118 | { |
140 | return -ENODEV; | 119 | return -ENODEV; |
141 | } | 120 | } |
142 | 121 | ||
143 | static inline int drm_agp_info_ioctl(struct drm_device *dev, void *data, | ||
144 | struct drm_file *file_priv) | ||
145 | { | ||
146 | return -ENODEV; | ||
147 | } | ||
148 | |||
149 | static inline int drm_agp_alloc(struct drm_device *dev, | 122 | static inline int drm_agp_alloc(struct drm_device *dev, |
150 | struct drm_agp_buffer *request) | 123 | struct drm_agp_buffer *request) |
151 | { | 124 | { |
152 | return -ENODEV; | 125 | return -ENODEV; |
153 | } | 126 | } |
154 | 127 | ||
155 | static inline int drm_agp_alloc_ioctl(struct drm_device *dev, void *data, | ||
156 | struct drm_file *file_priv) | ||
157 | { | ||
158 | return -ENODEV; | ||
159 | } | ||
160 | |||
161 | static inline int drm_agp_free(struct drm_device *dev, | 128 | static inline int drm_agp_free(struct drm_device *dev, |
162 | struct drm_agp_buffer *request) | 129 | struct drm_agp_buffer *request) |
163 | { | 130 | { |
164 | return -ENODEV; | 131 | return -ENODEV; |
165 | } | 132 | } |
166 | 133 | ||
167 | static inline int drm_agp_free_ioctl(struct drm_device *dev, void *data, | ||
168 | struct drm_file *file_priv) | ||
169 | { | ||
170 | return -ENODEV; | ||
171 | } | ||
172 | |||
173 | static inline int drm_agp_unbind(struct drm_device *dev, | 134 | static inline int drm_agp_unbind(struct drm_device *dev, |
174 | struct drm_agp_binding *request) | 135 | struct drm_agp_binding *request) |
175 | { | 136 | { |
176 | return -ENODEV; | 137 | return -ENODEV; |
177 | } | 138 | } |
178 | 139 | ||
179 | static inline int drm_agp_unbind_ioctl(struct drm_device *dev, void *data, | ||
180 | struct drm_file *file_priv) | ||
181 | { | ||
182 | return -ENODEV; | ||
183 | } | ||
184 | |||
185 | static inline int drm_agp_bind(struct drm_device *dev, | 140 | static inline int drm_agp_bind(struct drm_device *dev, |
186 | struct drm_agp_binding *request) | 141 | struct drm_agp_binding *request) |
187 | { | 142 | { |
188 | return -ENODEV; | 143 | return -ENODEV; |
189 | } | 144 | } |
190 | 145 | ||
191 | static inline int drm_agp_bind_ioctl(struct drm_device *dev, void *data, | 146 | #endif /* CONFIG_AGP */ |
192 | struct drm_file *file_priv) | ||
193 | { | ||
194 | return -ENODEV; | ||
195 | } | ||
196 | |||
197 | #endif /* __OS_HAS_AGP */ | ||
198 | 147 | ||
199 | #endif /* _DRM_AGPSUPPORT_H_ */ | 148 | #endif /* _DRM_AGPSUPPORT_H_ */ |