1 /* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*-
4 /**************************************************************************
6 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
9 **************************************************************************/
16 #include "drm_pciids.h"
18 int postinit( struct drm_device
*dev
, unsigned long flags
)
21 dev
->types
[6] = _DRM_STAT_IRQ
;
22 dev
->types
[7] = _DRM_STAT_PRIMARY
;
23 dev
->types
[8] = _DRM_STAT_SECONDARY
;
24 dev
->types
[9] = _DRM_STAT_DMA
;
26 DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
33 pci_pretty_name(dev
->pdev
)
38 static int version( drm_version_t
*version
)
42 version
->version_major
= DRIVER_MAJOR
;
43 version
->version_minor
= DRIVER_MINOR
;
44 version
->version_patchlevel
= DRIVER_PATCHLEVEL
;
45 DRM_COPY( version
->name
, DRIVER_NAME
);
46 DRM_COPY( version
->date
, DRIVER_DATE
);
47 DRM_COPY( version
->desc
, DRIVER_DESC
);
51 static struct pci_device_id pciidlist
[] = {
55 extern drm_ioctl_desc_t i915_ioctls
[];
56 extern int i915_max_ioctl
;
58 static struct drm_driver driver
= {
59 .driver_features
= DRIVER_USE_AGP
| DRIVER_REQUIRE_AGP
| DRIVER_USE_MTRR
|
60 DRIVER_HAVE_IRQ
| DRIVER_IRQ_SHARED
,
61 .pretakedown
= i915_driver_pretakedown
,
62 .prerelease
= i915_driver_prerelease
,
63 .irq_preinstall
= i915_driver_irq_preinstall
,
64 .irq_postinstall
= i915_driver_irq_postinstall
,
65 .irq_uninstall
= i915_driver_irq_uninstall
,
66 .irq_handler
= i915_driver_irq_handler
,
67 .reclaim_buffers
= drm_core_reclaim_buffers
,
68 .get_map_ofs
= drm_core_get_map_ofs
,
69 .get_reg_ofs
= drm_core_get_reg_ofs
,
72 .ioctls
= i915_ioctls
,
76 .release
= drm_release
,
84 .id_table
= pciidlist
,
88 static int __init
i915_init(void)
90 driver
.num_ioctls
= i915_max_ioctl
;
91 return drm_init(&driver
);
94 static void __exit
i915_exit(void)
99 module_init(i915_init
);
100 module_exit(i915_exit
);
102 MODULE_AUTHOR( DRIVER_AUTHOR
);
103 MODULE_DESCRIPTION( DRIVER_DESC
);
104 MODULE_LICENSE("GPL and additional rights");