diff options
-rw-r--r-- | drivers/gpu/drm/drm_agpsupport.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_memory.c | 6 | ||||
-rw-r--r-- | include/drm/drmP.h | 5 | ||||
-rw-r--r-- | include/drm/drm_agpsupport.h | 16 | ||||
-rw-r--r-- | include/drm/drm_os_linux.h | 14 |
5 files changed, 18 insertions, 31 deletions
diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c index 74fabe6956cb..dde205cef384 100644 --- a/drivers/gpu/drm/drm_agpsupport.c +++ b/drivers/gpu/drm/drm_agpsupport.c | |||
@@ -53,7 +53,7 @@ | |||
53 | */ | 53 | */ |
54 | int drm_agp_info(struct drm_device *dev, struct drm_agp_info *info) | 54 | int drm_agp_info(struct drm_device *dev, struct drm_agp_info *info) |
55 | { | 55 | { |
56 | DRM_AGP_KERN *kern; | 56 | struct agp_kern_info *kern; |
57 | 57 | ||
58 | if (!dev->agp || !dev->agp->acquired) | 58 | if (!dev->agp || !dev->agp->acquired) |
59 | return -EINVAL; | 59 | return -EINVAL; |
@@ -198,7 +198,7 @@ int drm_agp_enable_ioctl(struct drm_device *dev, void *data, | |||
198 | int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request) | 198 | int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request) |
199 | { | 199 | { |
200 | struct drm_agp_mem *entry; | 200 | struct drm_agp_mem *entry; |
201 | DRM_AGP_MEM *memory; | 201 | struct agp_memory *memory; |
202 | unsigned long pages; | 202 | unsigned long pages; |
203 | u32 type; | 203 | u32 type; |
204 | 204 | ||
@@ -466,14 +466,14 @@ void drm_agp_clear(struct drm_device *dev) | |||
466 | * No reference is held on the pages during this time -- it is up to the | 466 | * No reference is held on the pages during this time -- it is up to the |
467 | * caller to handle that. | 467 | * caller to handle that. |
468 | */ | 468 | */ |
469 | DRM_AGP_MEM * | 469 | struct agp_memory * |
470 | drm_agp_bind_pages(struct drm_device *dev, | 470 | drm_agp_bind_pages(struct drm_device *dev, |
471 | struct page **pages, | 471 | struct page **pages, |
472 | unsigned long num_pages, | 472 | unsigned long num_pages, |
473 | uint32_t gtt_offset, | 473 | uint32_t gtt_offset, |
474 | u32 type) | 474 | u32 type) |
475 | { | 475 | { |
476 | DRM_AGP_MEM *mem; | 476 | struct agp_memory *mem; |
477 | int ret, i; | 477 | int ret, i; |
478 | 478 | ||
479 | DRM_DEBUG("\n"); | 479 | DRM_DEBUG("\n"); |
diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index 3359bc453e11..00c67c0f2381 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c | |||
@@ -82,19 +82,19 @@ static void *agp_remap(unsigned long offset, unsigned long size, | |||
82 | } | 82 | } |
83 | 83 | ||
84 | /** Wrapper around agp_free_memory() */ | 84 | /** Wrapper around agp_free_memory() */ |
85 | void drm_free_agp(DRM_AGP_MEM * handle, int pages) | 85 | void drm_free_agp(struct agp_memory * handle, int pages) |
86 | { | 86 | { |
87 | agp_free_memory(handle); | 87 | agp_free_memory(handle); |
88 | } | 88 | } |
89 | 89 | ||
90 | /** Wrapper around agp_bind_memory() */ | 90 | /** Wrapper around agp_bind_memory() */ |
91 | int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start) | 91 | int drm_bind_agp(struct agp_memory * handle, unsigned int start) |
92 | { | 92 | { |
93 | return agp_bind_memory(handle, start); | 93 | return agp_bind_memory(handle, start); |
94 | } | 94 | } |
95 | 95 | ||
96 | /** Wrapper around agp_unbind_memory() */ | 96 | /** Wrapper around agp_unbind_memory() */ |
97 | int drm_unbind_agp(DRM_AGP_MEM * handle) | 97 | int drm_unbind_agp(struct agp_memory * handle) |
98 | { | 98 | { |
99 | return agp_unbind_memory(handle); | 99 | return agp_unbind_memory(handle); |
100 | } | 100 | } |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 8e05ff81428d..90a99807e48d 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -527,7 +527,7 @@ struct drm_device_dma { | |||
527 | */ | 527 | */ |
528 | struct drm_agp_mem { | 528 | struct drm_agp_mem { |
529 | unsigned long handle; /**< handle */ | 529 | unsigned long handle; /**< handle */ |
530 | DRM_AGP_MEM *memory; | 530 | struct agp_memory *memory; |
531 | unsigned long bound; /**< address */ | 531 | unsigned long bound; /**< address */ |
532 | int pages; | 532 | int pages; |
533 | struct list_head head; | 533 | struct list_head head; |
@@ -539,7 +539,7 @@ struct drm_agp_mem { | |||
539 | * \sa drm_agp_init() and drm_device::agp. | 539 | * \sa drm_agp_init() and drm_device::agp. |
540 | */ | 540 | */ |
541 | struct drm_agp_head { | 541 | struct drm_agp_head { |
542 | DRM_AGP_KERN agp_info; /**< AGP device information */ | 542 | struct agp_kern_info agp_info; /**< AGP device information */ |
543 | struct list_head memory; | 543 | struct list_head memory; |
544 | unsigned long mode; /**< AGP mode */ | 544 | unsigned long mode; /**< AGP mode */ |
545 | struct agp_bridge_data *bridge; | 545 | struct agp_bridge_data *bridge; |
@@ -1280,6 +1280,7 @@ extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); | |||
1280 | /* Memory management support (drm_memory.h) */ | 1280 | /* Memory management support (drm_memory.h) */ |
1281 | #include <drm/drm_memory.h> | 1281 | #include <drm/drm_memory.h> |
1282 | 1282 | ||
1283 | |||
1283 | /* Misc. IOCTL support (drm_ioctl.h) */ | 1284 | /* Misc. IOCTL support (drm_ioctl.h) */ |
1284 | extern int drm_irq_by_busid(struct drm_device *dev, void *data, | 1285 | extern int drm_irq_by_busid(struct drm_device *dev, void *data, |
1285 | struct drm_file *file_priv); | 1286 | struct drm_file *file_priv); |
diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h index 56a861b2ceaa..86a02188074b 100644 --- a/include/drm/drm_agpsupport.h +++ b/include/drm/drm_agpsupport.h | |||
@@ -10,10 +10,10 @@ | |||
10 | 10 | ||
11 | #if __OS_HAS_AGP | 11 | #if __OS_HAS_AGP |
12 | 12 | ||
13 | void drm_free_agp(DRM_AGP_MEM * handle, int pages); | 13 | void drm_free_agp(struct agp_memory * handle, int pages); |
14 | int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); | 14 | int drm_bind_agp(struct agp_memory * handle, unsigned int start); |
15 | int drm_unbind_agp(DRM_AGP_MEM * handle); | 15 | int drm_unbind_agp(struct agp_memory * handle); |
16 | DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev, | 16 | struct agp_memory *drm_agp_bind_pages(struct drm_device *dev, |
17 | struct page **pages, | 17 | struct page **pages, |
18 | unsigned long num_pages, | 18 | unsigned long num_pages, |
19 | uint32_t gtt_offset, | 19 | uint32_t gtt_offset, |
@@ -47,21 +47,21 @@ int drm_agp_bind_ioctl(struct drm_device *dev, void *data, | |||
47 | struct drm_file *file_priv); | 47 | struct drm_file *file_priv); |
48 | #else /* __OS_HAS_AGP */ | 48 | #else /* __OS_HAS_AGP */ |
49 | 49 | ||
50 | static inline void drm_free_agp(DRM_AGP_MEM * handle, int pages) | 50 | static inline void drm_free_agp(struct agp_memory * handle, int pages) |
51 | { | 51 | { |
52 | } | 52 | } |
53 | 53 | ||
54 | static inline int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start) | 54 | static inline int drm_bind_agp(struct agp_memory * handle, unsigned int start) |
55 | { | 55 | { |
56 | return -ENODEV; | 56 | return -ENODEV; |
57 | } | 57 | } |
58 | 58 | ||
59 | static inline int drm_unbind_agp(DRM_AGP_MEM * handle) | 59 | static inline int drm_unbind_agp(struct agp_memory * handle) |
60 | { | 60 | { |
61 | return -ENODEV; | 61 | return -ENODEV; |
62 | } | 62 | } |
63 | 63 | ||
64 | static inline DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev, | 64 | static inline struct agp_memory *drm_agp_bind_pages(struct drm_device *dev, |
65 | struct page **pages, | 65 | struct page **pages, |
66 | unsigned long num_pages, | 66 | unsigned long num_pages, |
67 | uint32_t gtt_offset, | 67 | uint32_t gtt_offset, |
diff --git a/include/drm/drm_os_linux.h b/include/drm/drm_os_linux.h index 815fafc6b4ad..fb90132b912e 100644 --- a/include/drm/drm_os_linux.h +++ b/include/drm/drm_os_linux.h | |||
@@ -51,20 +51,6 @@ static inline void writeq(u64 val, void __iomem *reg) | |||
51 | /** IRQ handler arguments and return type and values */ | 51 | /** IRQ handler arguments and return type and values */ |
52 | #define DRM_IRQ_ARGS int irq, void *arg | 52 | #define DRM_IRQ_ARGS int irq, void *arg |
53 | 53 | ||
54 | /** AGP types */ | ||
55 | #if __OS_HAS_AGP | ||
56 | #define DRM_AGP_MEM struct agp_memory | ||
57 | #define DRM_AGP_KERN struct agp_kern_info | ||
58 | #else | ||
59 | /* define some dummy types for non AGP supporting kernels */ | ||
60 | struct no_agp_kern { | ||
61 | unsigned long aper_base; | ||
62 | unsigned long aper_size; | ||
63 | }; | ||
64 | #define DRM_AGP_MEM int | ||
65 | #define DRM_AGP_KERN struct no_agp_kern | ||
66 | #endif | ||
67 | |||
68 | /** Other copying of data to kernel space */ | 54 | /** Other copying of data to kernel space */ |
69 | #define DRM_COPY_FROM_USER(arg1, arg2, arg3) \ | 55 | #define DRM_COPY_FROM_USER(arg1, arg2, arg3) \ |
70 | copy_from_user(arg1, arg2, arg3) | 56 | copy_from_user(arg1, arg2, arg3) |