aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-09-10 04:23:07 -0400
committerDave Airlie <airlied@redhat.com>2014-09-12 00:11:14 -0400
commitfd7e0d719260259f6e4e7711bd63a4175557d559 (patch)
treec962b80f0ece6a61d2566c8596ebe68c8aeab4f5
parent10d123b2f2b5bf54f59a884f12018d24a97d5a63 (diff)
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 <daniel.vetter@ffwll.ch> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/ati_pcigart.c2
-rw-r--r--drivers/gpu/drm/r128/r128_drv.h1
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.h1
-rw-r--r--include/drm/ati_pcigart.h28
-rw-r--r--include/drm/drmP.h23
5 files changed, 32 insertions, 23 deletions
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 @@
34#include <linux/export.h> 34#include <linux/export.h>
35#include <drm/drmP.h> 35#include <drm/drmP.h>
36 36
37#include <drm/ati_pcigart.h>
38
37# define ATI_PCIGART_PAGE_SIZE 4096 /**< PCI GART page size */ 39# define ATI_PCIGART_PAGE_SIZE 4096 /**< PCI GART page size */
38 40
39static int drm_ati_alloc_pcigart_table(struct drm_device *dev, 41static 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 @@
35#ifndef __R128_DRV_H__ 35#ifndef __R128_DRV_H__
36#define __R128_DRV_H__ 36#define __R128_DRV_H__
37 37
38#include <drm/ati_pcigart.h>
38/* General customization: 39/* General customization:
39 */ 40 */
40#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc." 41#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 @@
34#include <linux/firmware.h> 34#include <linux/firmware.h>
35#include <linux/platform_device.h> 35#include <linux/platform_device.h>
36 36
37#include <drm/ati_pcigart.h>
37#include "radeon_family.h" 38#include "radeon_family.h"
38 39
39/* General customization: 40/* 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 @@
1#ifndef DRM_ATI_PCIGART_H
2#define DRM_ATI_PCIGART_H
3
4/* location of GART table */
5#define DRM_ATI_GART_MAIN 1
6#define DRM_ATI_GART_FB 2
7
8#define DRM_ATI_GART_PCI 1
9#define DRM_ATI_GART_PCIE 2
10#define DRM_ATI_GART_IGP 3
11
12struct drm_ati_pcigart_info {
13 int gart_table_location;
14 int gart_reg_if;
15 void *addr;
16 dma_addr_t bus_addr;
17 dma_addr_t table_mask;
18 struct drm_dma_handle *table_handle;
19 struct drm_local_map mapping;
20 int table_size;
21};
22
23extern int drm_ati_pcigart_init(struct drm_device *dev,
24 struct drm_ati_pcigart_info * gart_info);
25extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
26 struct drm_ati_pcigart_info * gart_info);
27
28#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 {
461 struct drm_master *master; 461 struct drm_master *master;
462}; 462};
463 463
464/* location of GART table */
465#define DRM_ATI_GART_MAIN 1
466#define DRM_ATI_GART_FB 2
467
468#define DRM_ATI_GART_PCI 1
469#define DRM_ATI_GART_PCIE 2
470#define DRM_ATI_GART_IGP 3
471
472struct drm_ati_pcigart_info {
473 int gart_table_location;
474 int gart_reg_if;
475 void *addr;
476 dma_addr_t bus_addr;
477 dma_addr_t table_mask;
478 struct drm_dma_handle *table_handle;
479 struct drm_local_map mapping;
480 int table_size;
481};
482 464
483/** 465/**
484 * This structure defines the drm_mm memory object, which will be used by the 466 * 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,
1324extern int drm_sg_free(struct drm_device *dev, void *data, 1306extern int drm_sg_free(struct drm_device *dev, void *data,
1325 struct drm_file *file_priv); 1307 struct drm_file *file_priv);
1326 1308
1327 /* ATI PCIGART support (ati_pcigart.h) */
1328extern int drm_ati_pcigart_init(struct drm_device *dev,
1329 struct drm_ati_pcigart_info * gart_info);
1330extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
1331 struct drm_ati_pcigart_info * gart_info);
1332 1309
1333extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size, 1310extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
1334 size_t align); 1311 size_t align);