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