diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-11-12 05:52:46 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-11-12 05:52:46 -0500 |
commit | 925142431bd653175b80ae153bd7a8bc13628bde (patch) | |
tree | 594c1e65d3bf25b10961ea2b97dee5704b4f6cb5 /drivers/char/drm/via_drv.c | |
parent | 792d2b9a12594522111fbe2a7f17460a4d7edff7 (diff) |
drm: update VIA driver to 2.7.2
Add PCI DMA blitengine to VIA DRM
Add portability code for porting VIA to FreeBSD.
Sync via_drm.h with 3d driver
From: Thomas Hellstrom <unichrome@shipmail.org>, Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/via_drv.c')
-rw-r--r-- | drivers/char/drm/via_drv.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/char/drm/via_drv.c b/drivers/char/drm/via_drv.c index e8adebdba127..3f012255d315 100644 --- a/drivers/char/drm/via_drv.c +++ b/drivers/char/drm/via_drv.c | |||
@@ -38,25 +38,12 @@ static struct pci_device_id pciidlist[] = { | |||
38 | viadrv_PCI_IDS | 38 | viadrv_PCI_IDS |
39 | }; | 39 | }; |
40 | 40 | ||
41 | static drm_ioctl_desc_t ioctls[] = { | ||
42 | [DRM_IOCTL_NR(DRM_VIA_ALLOCMEM)] = {via_mem_alloc, 1, 0}, | ||
43 | [DRM_IOCTL_NR(DRM_VIA_FREEMEM)] = {via_mem_free, 1, 0}, | ||
44 | [DRM_IOCTL_NR(DRM_VIA_AGP_INIT)] = {via_agp_init, 1, 0}, | ||
45 | [DRM_IOCTL_NR(DRM_VIA_FB_INIT)] = {via_fb_init, 1, 0}, | ||
46 | [DRM_IOCTL_NR(DRM_VIA_MAP_INIT)] = {via_map_init, 1, 0}, | ||
47 | [DRM_IOCTL_NR(DRM_VIA_DEC_FUTEX)] = {via_decoder_futex, 1, 0}, | ||
48 | [DRM_IOCTL_NR(DRM_VIA_DMA_INIT)] = {via_dma_init, 1, 0}, | ||
49 | [DRM_IOCTL_NR(DRM_VIA_CMDBUFFER)] = {via_cmdbuffer, 1, 0}, | ||
50 | [DRM_IOCTL_NR(DRM_VIA_FLUSH)] = {via_flush_ioctl, 1, 0}, | ||
51 | [DRM_IOCTL_NR(DRM_VIA_PCICMD)] = {via_pci_cmdbuffer, 1, 0}, | ||
52 | [DRM_IOCTL_NR(DRM_VIA_CMDBUF_SIZE)] = {via_cmdbuf_size, 1, 0}, | ||
53 | [DRM_IOCTL_NR(DRM_VIA_WAIT_IRQ)] = {via_wait_irq, 1, 0} | ||
54 | }; | ||
55 | |||
56 | static struct drm_driver driver = { | 41 | static struct drm_driver driver = { |
57 | .driver_features = | 42 | .driver_features = |
58 | DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_IRQ | | 43 | DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_IRQ | |
59 | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL, | 44 | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL, |
45 | .load = via_driver_load, | ||
46 | .unload = via_driver_unload, | ||
60 | .context_ctor = via_init_context, | 47 | .context_ctor = via_init_context, |
61 | .context_dtor = via_final_context, | 48 | .context_dtor = via_final_context, |
62 | .vblank_wait = via_driver_vblank_wait, | 49 | .vblank_wait = via_driver_vblank_wait, |
@@ -69,8 +56,7 @@ static struct drm_driver driver = { | |||
69 | .reclaim_buffers = drm_core_reclaim_buffers, | 56 | .reclaim_buffers = drm_core_reclaim_buffers, |
70 | .get_map_ofs = drm_core_get_map_ofs, | 57 | .get_map_ofs = drm_core_get_map_ofs, |
71 | .get_reg_ofs = drm_core_get_reg_ofs, | 58 | .get_reg_ofs = drm_core_get_reg_ofs, |
72 | .ioctls = ioctls, | 59 | .ioctls = via_ioctls, |
73 | .num_ioctls = DRM_ARRAY_SIZE(ioctls), | ||
74 | .fops = { | 60 | .fops = { |
75 | .owner = THIS_MODULE, | 61 | .owner = THIS_MODULE, |
76 | .open = drm_open, | 62 | .open = drm_open, |
@@ -95,6 +81,7 @@ static struct drm_driver driver = { | |||
95 | 81 | ||
96 | static int __init via_init(void) | 82 | static int __init via_init(void) |
97 | { | 83 | { |
84 | driver.num_ioctls = via_max_ioctl; | ||
98 | via_init_command_verifier(); | 85 | via_init_command_verifier(); |
99 | return drm_init(&driver); | 86 | return drm_init(&driver); |
100 | } | 87 | } |