Deleted Added
full compact
mach64_drv.c (189130) mach64_drv.c (189563)
1/* mach64_drv.c -- ATI Rage 128 driver -*- linux-c -*-
2 * Created: Mon Dec 13 09:47:27 1999 by faith@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 *

--- 17 unchanged lines hidden (view full) ---

26 * OTHER DEALINGS IN THE SOFTWARE.
27 *
28 * Authors:
29 * Rickard E. (Rik) Faith <faith@valinux.com>
30 * Gareth Hughes <gareth@valinux.com>
31 */
32
33#include <sys/cdefs.h>
1/* mach64_drv.c -- ATI Rage 128 driver -*- linux-c -*-
2 * Created: Mon Dec 13 09:47:27 1999 by faith@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 *

--- 17 unchanged lines hidden (view full) ---

26 * OTHER DEALINGS IN THE SOFTWARE.
27 *
28 * Authors:
29 * Rickard E. (Rik) Faith <faith@valinux.com>
30 * Gareth Hughes <gareth@valinux.com>
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/dev/drm/mach64_drv.c 189130 2009-02-28 02:37:55Z rnoland $");
34__FBSDID("$FreeBSD: head/sys/dev/drm/mach64_drv.c 189563 2009-03-09 07:55:18Z rnoland $");
35
36
37#include <sys/types.h>
38
39#include "dev/drm/drmP.h"
40#include "dev/drm/drm.h"
41#include "dev/drm/mach64_drm.h"
42#include "dev/drm/mach64_drv.h"

--- 29 unchanged lines hidden (view full) ---

72 dev->driver->desc = DRIVER_DESC;
73 dev->driver->date = DRIVER_DATE;
74 dev->driver->major = DRIVER_MAJOR;
75 dev->driver->minor = DRIVER_MINOR;
76 dev->driver->patchlevel = DRIVER_PATCHLEVEL;
77}
78
79static int
35
36
37#include <sys/types.h>
38
39#include "dev/drm/drmP.h"
40#include "dev/drm/drm.h"
41#include "dev/drm/mach64_drm.h"
42#include "dev/drm/mach64_drv.h"

--- 29 unchanged lines hidden (view full) ---

72 dev->driver->desc = DRIVER_DESC;
73 dev->driver->date = DRIVER_DATE;
74 dev->driver->major = DRIVER_MAJOR;
75 dev->driver->minor = DRIVER_MINOR;
76 dev->driver->patchlevel = DRIVER_PATCHLEVEL;
77}
78
79static int
80mach64_probe(device_t dev)
80mach64_probe(device_t kdev)
81{
81{
82 return drm_probe(dev, mach64_pciidlist);
82 return drm_probe(kdev, mach64_pciidlist);
83}
84
85static int
83}
84
85static int
86mach64_attach(device_t nbdev)
86mach64_attach(device_t kdev)
87{
87{
88 struct drm_device *dev = device_get_softc(nbdev);
88 struct drm_device *dev = device_get_softc(kdev);
89
90 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
91 M_WAITOK | M_ZERO);
92
93 mach64_configure(dev);
94
89
90 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
91 M_WAITOK | M_ZERO);
92
93 mach64_configure(dev);
94
95 return drm_attach(nbdev, mach64_pciidlist);
95 return drm_attach(kdev, mach64_pciidlist);
96}
97
98int
99mach64_driver_load(struct drm_device * dev, unsigned long flags)
100{
101 return drm_vblank_init(dev, 1);
102}
103
104static int
96}
97
98int
99mach64_driver_load(struct drm_device * dev, unsigned long flags)
100{
101 return drm_vblank_init(dev, 1);
102}
103
104static int
105mach64_detach(device_t nbdev)
105mach64_detach(device_t kdev)
106{
106{
107 struct drm_device *dev = device_get_softc(nbdev);
107 struct drm_device *dev = device_get_softc(kdev);
108 int ret;
109
108 int ret;
109
110 ret = drm_detach(nbdev);
110 ret = drm_detach(kdev);
111
112 free(dev->driver, DRM_MEM_DRIVER);
113
114 return ret;
115}
116
117static device_method_t mach64_methods[] = {
118 /* Device interface */

--- 20 unchanged lines hidden ---
111
112 free(dev->driver, DRM_MEM_DRIVER);
113
114 return ret;
115}
116
117static device_method_t mach64_methods[] = {
118 /* Device interface */

--- 20 unchanged lines hidden ---