2 * Copyright 2005 Adam Jackson.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * on the rights to use, copy, modify, merge, publish, distribute, sub
8 * license, and/or sell copies of the Software, and to permit persons to whom
9 * the Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18 * ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 /* derived from tdfx_drv.c */
26 #include "imagine_drv.h"
28 #include "drm_pciids.h"
30 static struct drm_driver driver;
32 static struct pci_device_id pciidlist[] = {
36 static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
38 return drm_get_dev(pdev, ent, &driver);
41 static struct drm_driver driver = {
42 .driver_features = DRIVER_USE_MTRR,
43 .reclaim_buffers = drm_core_reclaim_buffers,
44 .get_map_ofs = drm_core_get_map_ofs,
45 .get_reg_ofs = drm_core_get_reg_ofs,
49 .release = drm_release,
57 .id_table = pciidlist,
59 .remove = __devexit_p(drm_cleanup_pci),
65 .major = DRIVER_MAJOR,
66 .minor = DRIVER_MINOR,
67 .patchlevel = DRIVER_PATCHLEVEL,
70 static int __init imagine_init(void)
72 return drm_init(&driver, pciidlist);
75 static void __exit imagine_exit(void)
80 module_init(imagine_init);
81 module_exit(imagine_exit);
83 MODULE_AUTHOR(DRIVER_AUTHOR);
84 MODULE_DESCRIPTION(DRIVER_DESC);
85 MODULE_LICENSE("GPL and additional rights");