diff options
author | Eric Anholt <anholt@freebsd.org> | 2004-11-06 23:02:07 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2004-11-06 23:02:07 +0000 |
commit | cb5aaa89871c051098ae8067d0e386840b7bdc59 (patch) | |
tree | 240423a7c804efe8c9d4c6fdde2b40b9e7eb15fa /linux-core/mga_drv.c | |
parent | 7ddbd38dde5dc5566ba14f2b1c449611a6d0224f (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 'linux-core/mga_drv.c')
-rw-r--r-- | linux-core/mga_drv.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/linux-core/mga_drv.c b/linux-core/mga_drv.c index 65e9d9c1..7cd31ad9 100644 --- a/linux-core/mga_drv.c +++ b/linux-core/mga_drv.c @@ -71,18 +71,8 @@ static struct pci_device_id pciidlist[] = { mga_PCI_IDS }; -static drm_ioctl_desc_t 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}, -}; +extern drm_ioctl_desc_t mga_ioctls[]; +extern int mga_max_ioctl; static int probe(struct pci_dev *pdev, const struct pci_device_id *ent); static struct drm_driver driver = { @@ -102,8 +92,8 @@ static struct drm_driver driver = { .get_reg_ofs = drm_core_get_reg_ofs, .postinit = postinit, .version = version, - .ioctls = ioctls, - .num_ioctls = DRM_ARRAY_SIZE(ioctls), + .ioctls = mga_ioctls, + .num_ioctls = mga_max_ioctl, .dma_ioctl = mga_dma_buffers, .fops = { .owner = THIS_MODULE, |