mga_drv.c (183833) | mga_drv.c (189563) |
---|---|
1/* mga_drv.c -- Matrox G200/G400 driver -*- linux-c -*- 2 * Created: Mon Dec 13 01:56:22 1999 by jhartmann@precisioninsight.com 3 */ 4/*- 5 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. 6 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 7 * All Rights Reserved. 8 * --- 18 unchanged lines hidden (view full) --- 27 * 28 * Authors: 29 * Rickard E. (Rik) Faith <faith@valinux.com> 30 * Gareth Hughes <gareth@valinux.com> 31 * 32 */ 33 34#include <sys/cdefs.h> | 1/* mga_drv.c -- Matrox G200/G400 driver -*- linux-c -*- 2 * Created: Mon Dec 13 01:56:22 1999 by jhartmann@precisioninsight.com 3 */ 4/*- 5 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. 6 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 7 * All Rights Reserved. 8 * --- 18 unchanged lines hidden (view full) --- 27 * 28 * Authors: 29 * Rickard E. (Rik) Faith <faith@valinux.com> 30 * Gareth Hughes <gareth@valinux.com> 31 * 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/drm/mga_drv.c 183833 2008-10-13 18:03:27Z rnoland $"); | 35__FBSDID("$FreeBSD: head/sys/dev/drm/mga_drv.c 189563 2009-03-09 07:55:18Z rnoland $"); |
36 37#include "dev/drm/drmP.h" 38#include "dev/drm/drm.h" 39#include "dev/drm/mga_drm.h" 40#include "dev/drm/mga_drv.h" 41#include "dev/drm/drm_pciids.h" 42 43/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ --- 71 unchanged lines hidden (view full) --- 115 dev->driver->desc = DRIVER_DESC; 116 dev->driver->date = DRIVER_DATE; 117 dev->driver->major = DRIVER_MAJOR; 118 dev->driver->minor = DRIVER_MINOR; 119 dev->driver->patchlevel = DRIVER_PATCHLEVEL; 120} 121 122static int | 36 37#include "dev/drm/drmP.h" 38#include "dev/drm/drm.h" 39#include "dev/drm/mga_drm.h" 40#include "dev/drm/mga_drv.h" 41#include "dev/drm/drm_pciids.h" 42 43/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ --- 71 unchanged lines hidden (view full) --- 115 dev->driver->desc = DRIVER_DESC; 116 dev->driver->date = DRIVER_DATE; 117 dev->driver->major = DRIVER_MAJOR; 118 dev->driver->minor = DRIVER_MINOR; 119 dev->driver->patchlevel = DRIVER_PATCHLEVEL; 120} 121 122static int |
123mga_probe(device_t dev) | 123mga_probe(device_t kdev) |
124{ | 124{ |
125 return drm_probe(dev, mga_pciidlist); | 125 return drm_probe(kdev, mga_pciidlist); |
126} 127 128static int | 126} 127 128static int |
129mga_attach(device_t nbdev) | 129mga_attach(device_t kdev) |
130{ | 130{ |
131 struct drm_device *dev = device_get_softc(nbdev); | 131 struct drm_device *dev = device_get_softc(kdev); |
132 133 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, 134 M_WAITOK | M_ZERO); 135 136 mga_configure(dev); 137 | 132 133 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, 134 M_WAITOK | M_ZERO); 135 136 mga_configure(dev); 137 |
138 return drm_attach(nbdev, mga_pciidlist); | 138 return drm_attach(kdev, mga_pciidlist); |
139} 140 141static int | 139} 140 141static int |
142mga_detach(device_t nbdev) | 142mga_detach(device_t kdev) |
143{ | 143{ |
144 struct drm_device *dev = device_get_softc(nbdev); | 144 struct drm_device *dev = device_get_softc(kdev); |
145 int ret; 146 | 145 int ret; 146 |
147 ret = drm_detach(nbdev); | 147 ret = drm_detach(kdev); |
148 149 free(dev->driver, DRM_MEM_DRIVER); 150 151 return ret; 152} 153 154static device_method_t mga_methods[] = { 155 /* Device interface */ --- 20 unchanged lines hidden --- | 148 149 free(dev->driver, DRM_MEM_DRIVER); 150 151 return ret; 152} 153 154static device_method_t mga_methods[] = { 155 /* Device interface */ --- 20 unchanged lines hidden --- |