summaryrefslogtreecommitdiff
path: root/bsd-core/drmP.h
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-11-08 02:38:01 +0000
committerEric Anholt <anholt@freebsd.org>2005-11-08 02:38:01 +0000
commit1a256df4804e4e987f81226a5d8e0573363607ee (patch)
tree31749f8042cfdd36260f195fb3af65c7bab46e51 /bsd-core/drmP.h
parent145b23b55220bdfc6639d3279ad96310faa650a3 (diff)
Catch FreeBSD up to the pcie gart changes. Required minor modification to
radeon_cp.c to use a drm_local_map_t-type mapping (drm_core_ioremap rather than drm_ioremap), which contains private device mapping information on BSD. I also changed the ati_pcigart interface to use "void *" for pointers to kva rather than "unsigned long". While PCIGART support appears to be broken on FreeBSD currently, I think this is not new, and BusType PCI remains working on my r100 in Linux.
Diffstat (limited to 'bsd-core/drmP.h')
-rw-r--r--bsd-core/drmP.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h
index b98049c3..dda12560 100644
--- a/bsd-core/drmP.h
+++ b/bsd-core/drmP.h
@@ -622,6 +622,18 @@ typedef struct drm_vbl_sig {
int pid;
} drm_vbl_sig_t;
+/* location of GART table */
+#define DRM_ATI_GART_MAIN 1
+#define DRM_ATI_GART_FB 2
+
+typedef struct ati_pcigart_info {
+ int gart_table_location;
+ int is_pcie;
+ void *addr;
+ dma_addr_t bus_addr;
+ drm_local_map_t mapping;
+} drm_ati_pcigart_info;
+
struct drm_driver_info {
int (*load)(struct drm_device *, unsigned long flags);
int (*firstopen)(struct drm_device *);
@@ -907,10 +919,10 @@ extern int drm_sysctl_cleanup(drm_device_t *dev);
#endif /* __FreeBSD__ */
/* ATI PCIGART support (ati_pcigart.c) */
-int drm_ati_pcigart_init(drm_device_t *dev, unsigned long *addr,
- dma_addr_t *bus_addr, int is_pcie);
-int drm_ati_pcigart_cleanup(drm_device_t *dev, unsigned long addr,
- dma_addr_t bus_addr);
+int drm_ati_pcigart_init(drm_device_t *dev,
+ drm_ati_pcigart_info *gart_info);
+int drm_ati_pcigart_cleanup(drm_device_t *dev,
+ drm_ati_pcigart_info *gart_info);
/* Locking IOCTL support (drm_drv.c) */
int drm_lock(DRM_IOCTL_ARGS);