summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/drmP.h
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-05-06 19:24:57 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-05-06 19:24:57 +0000
commit1eed9bf6c704ac401ae8e0657f2ca1d96647174d (patch)
tree4da41d2b4ec815b7a1074b9bfe30b41916a6a242 /sys/dev/pci/drm/drmP.h
parent0d12c3f56a9965c9c1fbab7d8a961c9e121bc885 (diff)
Kill vtophys in drm.
The code we inherited from FreeBSD used vtophys is a fair few places, nuke that and replace with bus_dma. technically _DRM_SHM should be managed with uao_create(), but until we move away from mmap and into an ioctl to map, this will do. This also paves the way for amd64 support (it lacks vtophys). ok kettenis, miod looked at it a while back too.
Diffstat (limited to 'sys/dev/pci/drm/drmP.h')
-rw-r--r--sys/dev/pci/drm/drmP.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h
index f93246c0e93..2b0cc8e7f64 100644
--- a/sys/dev/pci/drm/drmP.h
+++ b/sys/dev/pci/drm/drmP.h
@@ -668,12 +668,26 @@ typedef struct drm_agp_head {
unsigned long page_mask;
} drm_agp_head_t;
+#ifdef __OpenBSD__
+struct drm_sg_dmamem {
+ bus_dma_tag_t sg_tag;
+ bus_dmamap_t sg_map;
+ bus_dma_segment_t *sg_segs;
+ int sg_nsegs;
+ size_t sg_size;
+ caddr_t sg_kva;
+};
+#endif
+
typedef struct drm_sg_mem {
unsigned long handle;
void *virtual;
int pages;
dma_addr_t *busaddr;
drm_dma_handle_t *dmah; /* Handle to PCI memory for ATI PCIGART table */
+#ifdef __OpenBSD__
+ struct drm_sg_dmamem *mem;
+#endif
} drm_sg_mem_t;
typedef TAILQ_HEAD(drm_map_list, drm_local_map) drm_map_list_t;