Deleted Added
full compact
i915_drv.c (183605) i915_drv.c (183833)
1/* i915_drv.c -- Intel i915 driver -*- linux-c -*-
2 * Created: Wed Feb 14 17:10:04 2001 by gareth@valinux.com
3 */
4/*-
5 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
6 * All Rights Reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a

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

25 * OTHER DEALINGS IN THE SOFTWARE.
26 *
27 * Authors:
28 * Gareth Hughes <gareth@valinux.com>
29 *
30 */
31
32#include <sys/cdefs.h>
1/* i915_drv.c -- Intel i915 driver -*- linux-c -*-
2 * Created: Wed Feb 14 17:10:04 2001 by gareth@valinux.com
3 */
4/*-
5 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
6 * All Rights Reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a

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

25 * OTHER DEALINGS IN THE SOFTWARE.
26 *
27 * Authors:
28 * Gareth Hughes <gareth@valinux.com>
29 *
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/dev/drm/i915_drv.c 183605 2008-10-04 14:51:14Z rnoland $");
33__FBSDID("$FreeBSD: head/sys/dev/drm/i915_drv.c 183833 2008-10-13 18:03:27Z rnoland $");
34
35#include "dev/drm/drmP.h"
36#include "dev/drm/drm.h"
37#include "dev/drm/i915_drm.h"
38#include "dev/drm/i915_drv.h"
39#include "dev/drm/drm_pciids.h"
40
41/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */

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

107 return drm_probe(dev, i915_pciidlist);
108}
109
110static int
111i915_attach(device_t nbdev)
112{
113 struct drm_device *dev = device_get_softc(nbdev);
114
34
35#include "dev/drm/drmP.h"
36#include "dev/drm/drm.h"
37#include "dev/drm/i915_drm.h"
38#include "dev/drm/i915_drv.h"
39#include "dev/drm/drm_pciids.h"
40
41/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */

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

107 return drm_probe(dev, i915_pciidlist);
108}
109
110static int
111i915_attach(device_t nbdev)
112{
113 struct drm_device *dev = device_get_softc(nbdev);
114
115 dev->driver = malloc(sizeof(struct drm_driver_info), M_DRM,
115 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
116 M_WAITOK | M_ZERO);
117
118 i915_configure(dev);
119
120 return drm_attach(nbdev, i915_pciidlist);
121}
122
123static int
124i915_detach(device_t nbdev)
125{
126 struct drm_device *dev = device_get_softc(nbdev);
127 int ret;
128
129 ret = drm_detach(nbdev);
130
116 M_WAITOK | M_ZERO);
117
118 i915_configure(dev);
119
120 return drm_attach(nbdev, i915_pciidlist);
121}
122
123static int
124i915_detach(device_t nbdev)
125{
126 struct drm_device *dev = device_get_softc(nbdev);
127 int ret;
128
129 ret = drm_detach(nbdev);
130
131 free(dev->driver, M_DRM);
131 free(dev->driver, DRM_MEM_DRIVER);
132
133 return ret;
134}
135
136static device_method_t i915_methods[] = {
137 /* Device interface */
138 DEVMETHOD(device_probe, i915_probe),
139 DEVMETHOD(device_attach, i915_attach),

--- 24 unchanged lines hidden ---
132
133 return ret;
134}
135
136static device_method_t i915_methods[] = {
137 /* Device interface */
138 DEVMETHOD(device_probe, i915_probe),
139 DEVMETHOD(device_attach, i915_attach),

--- 24 unchanged lines hidden ---