/* i810_drv.c -- I810 driver -*- linux-c -*-1* Created: Mon Dec 13 01:56:22 1999 by [email protected]2*3* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.4* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.5* All Rights Reserved.6*7* Permission is hereby granted, free of charge, to any person obtaining a8* copy of this software and associated documentation files (the "Software"),9* to deal in the Software without restriction, including without limitation10* the rights to use, copy, modify, merge, publish, distribute, sublicense,11* and/or sell copies of the Software, and to permit persons to whom the12* Software is furnished to do so, subject to the following conditions:13*14* The above copyright notice and this permission notice (including the next15* paragraph) shall be included in all copies or substantial portions of the16* Software.17*18* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR19* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,20* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL21* VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR22* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,23* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR24* OTHER DEALINGS IN THE SOFTWARE.25*26* Authors:27* Rickard E. (Rik) Faith <[email protected]>28* Jeff Hartmann <[email protected]>29* Gareth Hughes <[email protected]>30*/3132#include "drmP.h"33#include "drm.h"34#include "i810_drm.h"35#include "i810_drv.h"3637#include "drm_pciids.h"3839static struct pci_device_id pciidlist[] = {40i810_PCI_IDS41};4243static struct drm_driver driver = {44.driver_features =45DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR |46DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE,47.dev_priv_size = sizeof(drm_i810_buf_priv_t),48.load = i810_driver_load,49.lastclose = i810_driver_lastclose,50.preclose = i810_driver_preclose,51.device_is_agp = i810_driver_device_is_agp,52.reclaim_buffers_locked = i810_driver_reclaim_buffers_locked,53.dma_quiescent = i810_driver_dma_quiescent,54.ioctls = i810_ioctls,55.fops = {56.owner = THIS_MODULE,57.open = drm_open,58.release = drm_release,59.unlocked_ioctl = drm_ioctl,60.mmap = drm_mmap,61.poll = drm_poll,62.fasync = drm_fasync,63.llseek = noop_llseek,64},6566.name = DRIVER_NAME,67.desc = DRIVER_DESC,68.date = DRIVER_DATE,69.major = DRIVER_MAJOR,70.minor = DRIVER_MINOR,71.patchlevel = DRIVER_PATCHLEVEL,72};7374static struct pci_driver i810_pci_driver = {75.name = DRIVER_NAME,76.id_table = pciidlist,77};7879static int __init i810_init(void)80{81if (num_possible_cpus() > 1) {82pr_err("drm/i810 does not support SMP\n");83return -EINVAL;84}85driver.num_ioctls = i810_max_ioctl;86return drm_pci_init(&driver, &i810_pci_driver);87}8889static void __exit i810_exit(void)90{91drm_pci_exit(&driver, &i810_pci_driver);92}9394module_init(i810_init);95module_exit(i810_exit);9697MODULE_AUTHOR(DRIVER_AUTHOR);98MODULE_DESCRIPTION(DRIVER_DESC);99MODULE_LICENSE("GPL and additional rights");100101102