Deleted Added
full compact
r128_drv.c (189130) r128_drv.c (189563)
1/* r128_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 *

--- 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/* r128_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 *

--- 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/r128_drv.c 189130 2009-02-28 02:37:55Z rnoland $");
35__FBSDID("$FreeBSD: head/sys/dev/drm/r128_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/r128_drm.h"
40#include "dev/drm/r128_drv.h"
41#include "dev/drm/drm_pciids.h"
42
43/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */

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

71 dev->driver->desc = DRIVER_DESC;
72 dev->driver->date = DRIVER_DATE;
73 dev->driver->major = DRIVER_MAJOR;
74 dev->driver->minor = DRIVER_MINOR;
75 dev->driver->patchlevel = DRIVER_PATCHLEVEL;
76}
77
78static int
36
37#include "dev/drm/drmP.h"
38#include "dev/drm/drm.h"
39#include "dev/drm/r128_drm.h"
40#include "dev/drm/r128_drv.h"
41#include "dev/drm/drm_pciids.h"
42
43/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */

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

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

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

--- 20 unchanged lines hidden ---