1/* gamma.c -- 3dlabs GMX 2000 driver -*- linux-c -*- 2 * Created: Mon Jan 4 08:58:31 1999 by faith@precisioninsight.com 3 * 4 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. 5 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 6 * All Rights Reserved. 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a 9 * copy of this software and associated documentation files (the "Software"), 10 * to deal in the Software without restriction, including without limitation 11 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * and/or sell copies of the Software, and to permit persons to whom the 13 * Software is furnished to do so, subject to the following conditions: 14 * 15 * The above copyright notice and this permission notice (including the next 16 * paragraph) shall be included in all copies or substantial portions of the 17 * Software. 18 * 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 22 * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 * DEALINGS IN THE SOFTWARE. 26 * 27 * Authors: 28 * Rickard E. (Rik) Faith <faith@valinux.com> 29 * Gareth Hughes <gareth@valinux.com> 30 */ 31 32#include <linux/config.h> 33#include "gamma.h" 34#include "drmP.h" 35#include "gamma_drv.h" 36 37#define DRIVER_AUTHOR "VA Linux Systems Inc." 38 39#define DRIVER_NAME "gamma" 40#define DRIVER_DESC "3DLabs gamma" 41#define DRIVER_DATE "20010216" 42 43#define DRIVER_MAJOR 1 44#define DRIVER_MINOR 0 45#define DRIVER_PATCHLEVEL 0 46 47#define DRIVER_IOCTLS \ 48 [DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { gamma_dma, 1, 0 } 49 50 51#define __HAVE_COUNTERS 5 52#define __HAVE_COUNTER6 _DRM_STAT_IRQ 53#define __HAVE_COUNTER7 _DRM_STAT_DMA 54#define __HAVE_COUNTER8 _DRM_STAT_PRIMARY 55#define __HAVE_COUNTER9 _DRM_STAT_SPECIAL 56#define __HAVE_COUNTER10 _DRM_STAT_MISSED 57 58 59#include "drm_auth.h" 60#include "drm_bufs.h" 61#include "drm_context.h" 62#include "drm_dma.h" 63#include "drm_drawable.h" 64#include "drm_drv.h" 65 66#ifndef MODULE 67/* DRM(options) is called by the kernel to parse command-line options 68 * passed via the boot-loader (e.g., LILO). It calls the insmod option 69 * routine, drm_parse_drm. 70 */ 71 72/* JH- We have to hand expand the string ourselves because of the cpp. If 73 * anyone can think of a way that we can fit into the __setup macro without 74 * changing it, then please send the solution my way. 75 */ 76static int __init gamma_options( char *str ) 77{ 78 DRM(parse_options)( str ); 79 return 1; 80} 81 82__setup( DRIVER_NAME "=", gamma_options ); 83#endif 84 85 86#include "drm_fops.h" 87#include "drm_init.h" 88#include "drm_ioctl.h" 89#include "drm_lists.h" 90#include "drm_lock.h" 91#include "drm_memory.h" 92#include "drm_proc.h" 93#include "drm_vm.h" 94#include "drm_stub.h" 95