summaryrefslogtreecommitdiff
path: root/shared-core/mach64_state.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-11-06 23:02:07 +0000
committerEric Anholt <anholt@freebsd.org>2004-11-06 23:02:07 +0000
commitcb5aaa89871c051098ae8067d0e386840b7bdc59 (patch)
tree240423a7c804efe8c9d4c6fdde2b40b9e7eb15fa /shared-core/mach64_state.c
parent7ddbd38dde5dc5566ba14f2b1c449611a6d0224f (diff)
Convert more drivers for bsd-core, moving the ioctl definitions to shared
code. Remove the "drv" from sisdrv, as it's unnecessary. Use the drm_pci functions in i915 instead of per-os implementations of the same. Avoid whitespace within fields in drm_pciids.txt (one of the r300 definitions), since it breaks the bsd pciids script. Tested on sis, mga, r128. i915 needs more work.
Diffstat (limited to 'shared-core/mach64_state.c')
-rw-r--r--shared-core/mach64_state.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/shared-core/mach64_state.c b/shared-core/mach64_state.c
index 2d3c4f61..dbd38c87 100644
--- a/shared-core/mach64_state.c
+++ b/shared-core/mach64_state.c
@@ -34,6 +34,25 @@
#include "mach64_drm.h"
#include "mach64_drv.h"
+/* Interface history:
+ *
+ * 1.0 - Initial mach64 DRM
+ *
+ */
+drm_ioctl_desc_t mach64_ioctls[] = {
+ [DRM_IOCTL_NR(DRM_MACH64_INIT)] = {mach64_dma_init, 1, 1},
+ [DRM_IOCTL_NR(DRM_MACH64_CLEAR)] = {mach64_dma_clear, 1, 0},
+ [DRM_IOCTL_NR(DRM_MACH64_SWAP)] = {mach64_dma_swap, 1, 0},
+ [DRM_IOCTL_NR(DRM_MACH64_IDLE)] = {mach64_dma_idle, 1, 0},
+ [DRM_IOCTL_NR(DRM_MACH64_RESET)] = {mach64_engine_reset, 1, 0},
+ [DRM_IOCTL_NR(DRM_MACH64_VERTEX)] = {mach64_dma_vertex, 1, 0},
+ [DRM_IOCTL_NR(DRM_MACH64_BLIT)] = {mach64_dma_blit, 1, 0},
+ [DRM_IOCTL_NR(DRM_MACH64_FLUSH)] = {mach64_dma_flush, 1, 0},
+ [DRM_IOCTL_NR(DRM_MACH64_GETPARAM)] = {mach64_get_param, 1, 0},
+};
+
+int mach64_max_ioctl = DRM_ARRAY_SIZE(mach64_ioctls);
+
/* ================================================================
* DMA hardware state programming functions
*/