diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c index dde205cef384c08db92d114c16138c607ddc1da0..4b2b4aa5033ba1d6988f4f2c7dfc1ae605d82da5 100644 --- a/drivers/gpu/drm/drm_agpsupport.c +++ b/drivers/gpu/drm/drm_agpsupport.c @@ -34,6 +34,7 @@ #include #include #include +#include "drm_legacy.h" #if __OS_HAS_AGP diff --git a/drivers/gpu/drm/drm_legacy.h b/drivers/gpu/drm/drm_legacy.h index 47cb9de98fb9aa32edae1c9ad95176f4a7d12546..f2d076823b2d7e648597814b9adad6f559fbcd96 100644 --- a/drivers/gpu/drm/drm_legacy.h +++ b/drivers/gpu/drm/drm_legacy.h @@ -28,6 +28,9 @@ * should no longer be using. They cannot be removed as legacy * drivers use them, and removing them are API breaks. */ +#include + +struct agp_memory; struct drm_device; struct drm_file; @@ -68,4 +71,16 @@ int drm_legacy_freebufs(struct drm_device *d, void *v, struct drm_file *f); int drm_legacy_mapbufs(struct drm_device *d, void *v, struct drm_file *f); int drm_legacy_dma_ioctl(struct drm_device *d, void *v, struct drm_file *f); +/* + * AGP Support + */ + +struct drm_agp_mem { + unsigned long handle; + struct agp_memory *memory; + unsigned long bound; + int pages; + struct list_head head; +}; + #endif /* __DRM_LEGACY_H__ */ diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index 00c67c0f238127d1d36c8ba17e6caf184412c446..7888dad5ab74f75b243158ebbfb62702fb71575e 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c @@ -36,6 +36,7 @@ #include #include #include +#include "drm_legacy.h" #if __OS_HAS_AGP static void *agp_remap(unsigned long offset, unsigned long size, diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 352e3399d18f9429d762630cdf3fed69fa85d731..be25174f10e4eac9d292e88068694356f36976e7 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -40,6 +40,7 @@ #include #include #endif +#include "drm_legacy.h" struct drm_vma_entry { struct list_head head; diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 0bf66f907f25e6008d2e007e72a80013b8a9a7ad..7a3c73c5375ddb8466d3f01d957c2dea06680e91 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -80,6 +80,7 @@ struct module; struct drm_file; struct drm_device; +struct drm_agp_head; struct device_node; struct videomode; @@ -439,35 +440,6 @@ struct drm_device_dma { }; -/** - * AGP memory entry. Stored as a doubly linked list. - */ -struct drm_agp_mem { - unsigned long handle; /**< handle */ - struct agp_memory *memory; - unsigned long bound; /**< address */ - int pages; - struct list_head head; -}; - -/** - * AGP data. - * - * \sa drm_agp_init() and drm_device::agp. - */ -struct drm_agp_head { - struct agp_kern_info agp_info; /**< AGP device information */ - struct list_head memory; - unsigned long mode; /**< AGP mode */ - struct agp_bridge_data *bridge; - int enabled; /**< whether the AGP bus as been enabled */ - int acquired; /**< whether the AGP device has been acquired */ - unsigned long base; - int agp_mtrr; - int cant_use_aperture; - unsigned long page_mask; -}; - /** * Scatter-gather memory. */ diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h index 86a02188074bcec037714fdb1ea293dfb4ae3ebe..3bebeb4af8645a7188ee64672bde307b23d678b3 100644 --- a/include/drm/drm_agpsupport.h +++ b/include/drm/drm_agpsupport.h @@ -8,6 +8,19 @@ #include #include +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; +}; + #if __OS_HAS_AGP void drm_free_agp(struct agp_memory * handle, int pages);