From cb5aaa89871c051098ae8067d0e386840b7bdc59 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 6 Nov 2004 23:02:07 +0000 Subject: 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. --- shared-core/mga_state.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'shared-core/mga_state.c') diff --git a/shared-core/mga_state.c b/shared-core/mga_state.c index 558beed1..b529f6ce 100644 --- a/shared-core/mga_state.c +++ b/shared-core/mga_state.c @@ -37,6 +37,21 @@ #include "mga_drm.h" #include "mga_drv.h" +drm_ioctl_desc_t mga_ioctls[] = { + [DRM_IOCTL_NR(DRM_MGA_INIT)] = {mga_dma_init, 1, 1}, + [DRM_IOCTL_NR(DRM_MGA_FLUSH)] = {mga_dma_flush, 1, 0}, + [DRM_IOCTL_NR(DRM_MGA_RESET)] = {mga_dma_reset, 1, 0}, + [DRM_IOCTL_NR(DRM_MGA_SWAP)] = {mga_dma_swap, 1, 0}, + [DRM_IOCTL_NR(DRM_MGA_CLEAR)] = {mga_dma_clear, 1, 0}, + [DRM_IOCTL_NR(DRM_MGA_VERTEX)] = {mga_dma_vertex, 1, 0}, + [DRM_IOCTL_NR(DRM_MGA_INDICES)] = {mga_dma_indices, 1, 0}, + [DRM_IOCTL_NR(DRM_MGA_ILOAD)] = {mga_dma_iload, 1, 0}, + [DRM_IOCTL_NR(DRM_MGA_BLIT)] = {mga_dma_blit, 1, 0}, + [DRM_IOCTL_NR(DRM_MGA_GETPARAM)] = {mga_getparam, 1, 0}, +}; + +int mga_max_ioctl = DRM_ARRAY_SIZE(mga_ioctls); + /* ================================================================ * DMA hardware state programming functions */ -- cgit v1.2.3