gamma_drv.c
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  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. #include <linux/config.h>
  32. #include "gamma.h"
  33. #include "drmP.h"
  34. #include "gamma_drv.h"
  35. #define DRIVER_AUTHOR "VA Linux Systems Inc."
  36. #define DRIVER_NAME "gamma"
  37. #define DRIVER_DESC "3DLabs gamma"
  38. #define DRIVER_DATE "20010216"
  39. #define DRIVER_MAJOR 1
  40. #define DRIVER_MINOR 0
  41. #define DRIVER_PATCHLEVEL 0
  42. #define DRIVER_IOCTLS   
  43. [DRM_IOCTL_NR(DRM_IOCTL_DMA)]      = { gamma_dma,   1, 0 }
  44. #define __HAVE_COUNTERS 5
  45. #define __HAVE_COUNTER6 _DRM_STAT_IRQ
  46. #define __HAVE_COUNTER7 _DRM_STAT_DMA
  47. #define __HAVE_COUNTER8 _DRM_STAT_PRIMARY
  48. #define __HAVE_COUNTER9 _DRM_STAT_SPECIAL
  49. #define __HAVE_COUNTER10 _DRM_STAT_MISSED
  50. #include "drm_auth.h"
  51. #include "drm_bufs.h"
  52. #include "drm_context.h"
  53. #include "drm_dma.h"
  54. #include "drm_drawable.h"
  55. #include "drm_drv.h"
  56. #ifndef MODULE
  57. /* DRM(options) is called by the kernel to parse command-line options
  58.  * passed via the boot-loader (e.g., LILO).  It calls the insmod option
  59.  * routine, drm_parse_drm.
  60.  */
  61. /* JH- We have to hand expand the string ourselves because of the cpp.  If
  62.  * anyone can think of a way that we can fit into the __setup macro without
  63.  * changing it, then please send the solution my way.
  64.  */
  65. static int __init gamma_options( char *str )
  66. {
  67. DRM(parse_options)( str );
  68. return 1;
  69. }
  70. __setup( DRIVER_NAME "=", gamma_options );
  71. #endif
  72. #include "drm_fops.h"
  73. #include "drm_init.h"
  74. #include "drm_ioctl.h"
  75. #include "drm_lists.h"
  76. #include "drm_lock.h"
  77. #include "drm_memory.h"
  78. #include "drm_proc.h"
  79. #include "drm_vm.h"
  80. #include "drm_stub.h"