From: Dave Airlie Date: Wed, 10 Sep 2014 08:23:07 +0000 (+1000) Subject: drm: split ati_pcigart.h out of drmP.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fd7e0d719260259f6e4e7711bd63a4175557d559;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm: split ati_pcigart.h out of drmP.h Just move this into a separate header file, and make the two users use it. Reviewed-by: Daniel Vetter Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c index c399dea27a3b..6c4d4b6eba80 100644 --- a/drivers/gpu/drm/ati_pcigart.c +++ b/drivers/gpu/drm/ati_pcigart.c @@ -34,6 +34,8 @@ #include #include +#include + # define ATI_PCIGART_PAGE_SIZE 4096 /**< PCI GART page size */ static int drm_ati_alloc_pcigart_table(struct drm_device *dev, diff --git a/drivers/gpu/drm/r128/r128_drv.h b/drivers/gpu/drm/r128/r128_drv.h index 5bf3f5ff805d..49fe02670c2e 100644 --- a/drivers/gpu/drm/r128/r128_drv.h +++ b/drivers/gpu/drm/r128/r128_drv.h @@ -35,6 +35,7 @@ #ifndef __R128_DRV_H__ #define __R128_DRV_H__ +#include /* General customization: */ #define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc." diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index dafd812e4571..3590cb47a22e 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h @@ -34,6 +34,7 @@ #include #include +#include #include "radeon_family.h" /* General customization: diff --git a/include/drm/ati_pcigart.h b/include/drm/ati_pcigart.h new file mode 100644 index 000000000000..da4bfcd81a37 --- /dev/null +++ b/include/drm/ati_pcigart.h @@ -0,0 +1,28 @@ +#ifndef DRM_ATI_PCIGART_H +#define DRM_ATI_PCIGART_H + +/* location of GART table */ +#define DRM_ATI_GART_MAIN 1 +#define DRM_ATI_GART_FB 2 + +#define DRM_ATI_GART_PCI 1 +#define DRM_ATI_GART_PCIE 2 +#define DRM_ATI_GART_IGP 3 + +struct drm_ati_pcigart_info { + int gart_table_location; + int gart_reg_if; + void *addr; + dma_addr_t bus_addr; + dma_addr_t table_mask; + struct drm_dma_handle *table_handle; + struct drm_local_map mapping; + int table_size; +}; + +extern int drm_ati_pcigart_init(struct drm_device *dev, + struct drm_ati_pcigart_info * gart_info); +extern int drm_ati_pcigart_cleanup(struct drm_device *dev, + struct drm_ati_pcigart_info * gart_info); + +#endif diff --git a/include/drm/drmP.h b/include/drm/drmP.h index be1160fa5ebc..e4ba3de22601 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -461,24 +461,6 @@ struct drm_map_list { struct drm_master *master; }; -/* location of GART table */ -#define DRM_ATI_GART_MAIN 1 -#define DRM_ATI_GART_FB 2 - -#define DRM_ATI_GART_PCI 1 -#define DRM_ATI_GART_PCIE 2 -#define DRM_ATI_GART_IGP 3 - -struct drm_ati_pcigart_info { - int gart_table_location; - int gart_reg_if; - void *addr; - dma_addr_t bus_addr; - dma_addr_t table_mask; - struct drm_dma_handle *table_handle; - struct drm_local_map mapping; - int table_size; -}; /** * This structure defines the drm_mm memory object, which will be used by the @@ -1324,11 +1306,6 @@ extern int drm_sg_alloc(struct drm_device *dev, void *data, extern int drm_sg_free(struct drm_device *dev, void *data, struct drm_file *file_priv); - /* ATI PCIGART support (ati_pcigart.h) */ -extern int drm_ati_pcigart_init(struct drm_device *dev, - struct drm_ati_pcigart_info * gart_info); -extern int drm_ati_pcigart_cleanup(struct drm_device *dev, - struct drm_ati_pcigart_info * gart_info); extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size, size_t align);