summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorJeff Hartmann <jhartmann@valinux.com>2001-01-17 18:43:04 +0000
committerJeff Hartmann <jhartmann@valinux.com>2001-01-17 18:43:04 +0000
commite2117d5487f8ebaa4b2a76ed8a4e4e1e74b745e3 (patch)
treec557b3b0ba9a75650fde0bd47f3f3f2f5d642a8c /shared
parent61c15f4a2d053c9e609360a5e600f56b0887c3aa (diff)
Sorta working (i.e., sometimes it works right) r128 pcigart implementation,
based on code from Gareth Hughes. Needs bug fixing before its ready for general use.
Diffstat (limited to 'shared')
-rw-r--r--shared/drm.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/shared/drm.h b/shared/drm.h
index dc3d262d..f657eab9 100644
--- a/shared/drm.h
+++ b/shared/drm.h
@@ -124,10 +124,11 @@ typedef struct drm_control {
} drm_control_t;
typedef enum drm_map_type {
- _DRM_FRAME_BUFFER = 0, /* WC (no caching), no core dump */
- _DRM_REGISTERS = 1, /* no caching, no core dump */
- _DRM_SHM = 2, /* shared, cached */
- _DRM_AGP = 3 /* AGP/GART */
+ _DRM_FRAME_BUFFER = 0, /* WC (no caching), no core dump */
+ _DRM_REGISTERS = 1, /* no caching, no core dump */
+ _DRM_SHM = 2, /* shared, cached */
+ _DRM_AGP = 3, /* AGP/GART */
+ _DRM_SCATTER_GATHER = 4 /* Scatter/gather memory for PCI DMA */
} drm_map_type_t;
typedef enum drm_map_flags {
@@ -192,7 +193,8 @@ typedef struct drm_buf_desc {
int high_mark; /* High water mark */
enum {
_DRM_PAGE_ALIGN = 0x01, /* Align on page boundaries for DMA */
- _DRM_AGP_BUFFER = 0x02 /* Buffer is in agp space */
+ _DRM_AGP_BUFFER = 0x02, /* Buffer is in agp space */
+ _DRM_SG_BUFFER = 0x04 /* Scatter/gather memory buffer */
} flags;
unsigned long agp_start; /* Start address of where the agp buffers
* are in the agp aperture */
@@ -298,6 +300,11 @@ typedef struct drm_agp_info {
unsigned short id_device;
} drm_agp_info_t;
+typedef struct drm_scatter_gather {
+ unsigned long size; /* In bytes -- will round to page boundary */
+ unsigned long handle; /* Used for mapping / unmapping */
+} drm_scatter_gather_t;
+
#define DRM_IOCTL_BASE 'd'
#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
#define DRM_IOR(nr,size) _IOR(DRM_IOCTL_BASE,nr,size)
@@ -345,6 +352,9 @@ typedef struct drm_agp_info {
#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, drm_agp_binding_t)
#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, drm_agp_binding_t)
+#define DRM_IOCTL_SG_ALLOC DRM_IOW( 0x38, drm_scatter_gather_t)
+#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, drm_scatter_gather_t)
+
/* Mga specific ioctls */
#define DRM_IOCTL_MGA_INIT DRM_IOW( 0x40, drm_mga_init_t)
#define DRM_IOCTL_MGA_SWAP DRM_IOW( 0x41, drm_mga_swap_t)