netfilter: nf_tables: Align nft_expr private data to 64-bit
[linux-2.6-block.git] / include / drm / drm_agpsupport.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
00fd78e5
DH
2#ifndef _DRM_AGPSUPPORT_H_
3#define _DRM_AGPSUPPORT_H_
4
d7d2c48e 5#include <linux/agp_backend.h>
00fd78e5 6#include <linux/kernel.h>
d7d2c48e 7#include <linux/list.h>
00fd78e5
DH
8#include <linux/mm.h>
9#include <linux/mutex.h>
10#include <linux/types.h>
d7d2c48e
DH
11#include <uapi/drm/drm.h>
12
13struct drm_device;
14struct drm_file;
00fd78e5 15
cc5ea594
DH
16struct 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
a7fb8a23 29#if IS_ENABLED(CONFIG_AGP)
00fd78e5 30
d2e546b8
DV
31void drm_free_agp(struct agp_memory * handle, int pages);
32int drm_bind_agp(struct agp_memory * handle, unsigned int start);
33int drm_unbind_agp(struct agp_memory * handle);
00fd78e5
DH
34
35struct drm_agp_head *drm_agp_init(struct drm_device *dev);
366884b1 36void drm_legacy_agp_clear(struct drm_device *dev);
00fd78e5
DH
37int drm_agp_acquire(struct drm_device *dev);
38int drm_agp_acquire_ioctl(struct drm_device *dev, void *data,
39 struct drm_file *file_priv);
40int drm_agp_release(struct drm_device *dev);
41int drm_agp_release_ioctl(struct drm_device *dev, void *data,
42 struct drm_file *file_priv);
43int drm_agp_enable(struct drm_device *dev, struct drm_agp_mode mode);
44int drm_agp_enable_ioctl(struct drm_device *dev, void *data,
45 struct drm_file *file_priv);
46int drm_agp_info(struct drm_device *dev, struct drm_agp_info *info);
47int drm_agp_info_ioctl(struct drm_device *dev, void *data,
48 struct drm_file *file_priv);
49int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request);
50int drm_agp_alloc_ioctl(struct drm_device *dev, void *data,
51 struct drm_file *file_priv);
52int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request);
53int drm_agp_free_ioctl(struct drm_device *dev, void *data,
54 struct drm_file *file_priv);
55int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request);
56int drm_agp_unbind_ioctl(struct drm_device *dev, void *data,
57 struct drm_file *file_priv);
58int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request);
59int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
60 struct drm_file *file_priv);
d7d2c48e 61
a7fb8a23 62#else /* CONFIG_AGP */
00fd78e5 63
d2e546b8 64static inline void drm_free_agp(struct agp_memory * handle, int pages)
00fd78e5
DH
65{
66}
67
d2e546b8 68static inline int drm_bind_agp(struct agp_memory * handle, unsigned int start)
00fd78e5
DH
69{
70 return -ENODEV;
71}
72
d2e546b8 73static inline int drm_unbind_agp(struct agp_memory * handle)
00fd78e5
DH
74{
75 return -ENODEV;
76}
77
00fd78e5
DH
78static inline struct drm_agp_head *drm_agp_init(struct drm_device *dev)
79{
80 return NULL;
81}
82
366884b1 83static inline void drm_legacy_agp_clear(struct drm_device *dev)
00fd78e5
DH
84{
85}
86
87static inline int drm_agp_acquire(struct drm_device *dev)
88{
89 return -ENODEV;
90}
91
00fd78e5
DH
92static inline int drm_agp_release(struct drm_device *dev)
93{
94 return -ENODEV;
95}
96
00fd78e5
DH
97static inline int drm_agp_enable(struct drm_device *dev,
98 struct drm_agp_mode mode)
99{
100 return -ENODEV;
101}
102
00fd78e5
DH
103static inline int drm_agp_info(struct drm_device *dev,
104 struct drm_agp_info *info)
105{
106 return -ENODEV;
107}
108
00fd78e5
DH
109static inline int drm_agp_alloc(struct drm_device *dev,
110 struct drm_agp_buffer *request)
111{
112 return -ENODEV;
113}
114
00fd78e5
DH
115static inline int drm_agp_free(struct drm_device *dev,
116 struct drm_agp_buffer *request)
117{
118 return -ENODEV;
119}
120
00fd78e5
DH
121static inline int drm_agp_unbind(struct drm_device *dev,
122 struct drm_agp_binding *request)
123{
124 return -ENODEV;
125}
126
00fd78e5
DH
127static inline int drm_agp_bind(struct drm_device *dev,
128 struct drm_agp_binding *request)
129{
130 return -ENODEV;
131}
132
a7fb8a23 133#endif /* CONFIG_AGP */
00fd78e5
DH
134
135#endif /* _DRM_AGPSUPPORT_H_ */