Deleted Added
full compact
mach64_drv.c (183605) mach64_drv.c (183833)
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 183605 2008-10-04 14:51:14Z rnoland $");
34__FBSDID("$FreeBSD: head/sys/dev/drm/mach64_drv.c 183833 2008-10-13 18:03:27Z 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"

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

81 return drm_probe(dev, mach64_pciidlist);
82}
83
84static int
85mach64_attach(device_t nbdev)
86{
87 struct drm_device *dev = device_get_softc(nbdev);
88
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"

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

81 return drm_probe(dev, mach64_pciidlist);
82}
83
84static int
85mach64_attach(device_t nbdev)
86{
87 struct drm_device *dev = device_get_softc(nbdev);
88
89 dev->driver = malloc(sizeof(struct drm_driver_info), M_DRM,
89 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
90 M_WAITOK | M_ZERO);
91
92 mach64_configure(dev);
93
94 return drm_attach(nbdev, mach64_pciidlist);
95}
96
97static int
98mach64_detach(device_t nbdev)
99{
100 struct drm_device *dev = device_get_softc(nbdev);
101 int ret;
102
103 ret = drm_detach(nbdev);
104
90 M_WAITOK | M_ZERO);
91
92 mach64_configure(dev);
93
94 return drm_attach(nbdev, mach64_pciidlist);
95}
96
97static int
98mach64_detach(device_t nbdev)
99{
100 struct drm_device *dev = device_get_softc(nbdev);
101 int ret;
102
103 ret = drm_detach(nbdev);
104
105 free(dev->driver, M_DRM);
105 free(dev->driver, DRM_MEM_DRIVER);
106
107 return ret;
108}
109
110static device_method_t mach64_methods[] = {
111 /* Device interface */
112 DEVMETHOD(device_probe, mach64_probe),
113 DEVMETHOD(device_attach, mach64_attach),

--- 18 unchanged lines hidden ---
106
107 return ret;
108}
109
110static device_method_t mach64_methods[] = {
111 /* Device interface */
112 DEVMETHOD(device_probe, mach64_probe),
113 DEVMETHOD(device_attach, mach64_attach),

--- 18 unchanged lines hidden ---