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

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

80 return drm_probe(dev, r128_pciidlist);
81}
82
83static int
84r128_attach(device_t nbdev)
85{
86 struct drm_device *dev = device_get_softc(nbdev);
87
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. */

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

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

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

--- 18 unchanged lines hidden ---