Deleted Added
full compact
tdfx_drv.c (183833) tdfx_drv.c (189563)
1/* tdfx_drv.c -- tdfx driver -*- linux-c -*-
2 * Created: Thu Oct 7 10:38:32 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 *

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

28 * Authors:
29 * Rickard E. (Rik) Faith <faith@valinux.com>
30 * Daryll Strauss <daryll@valinux.com>
31 * Gareth Hughes <gareth@valinux.com>
32 *
33 */
34
35#include <sys/cdefs.h>
1/* tdfx_drv.c -- tdfx driver -*- linux-c -*-
2 * Created: Thu Oct 7 10:38:32 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 *

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

28 * Authors:
29 * Rickard E. (Rik) Faith <faith@valinux.com>
30 * Daryll Strauss <daryll@valinux.com>
31 * Gareth Hughes <gareth@valinux.com>
32 *
33 */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/dev/drm/tdfx_drv.c 183833 2008-10-13 18:03:27Z rnoland $");
36__FBSDID("$FreeBSD: head/sys/dev/drm/tdfx_drv.c 189563 2009-03-09 07:55:18Z rnoland $");
37
38#include "dev/drm/tdfx_drv.h"
39#include "dev/drm/drmP.h"
40#include "dev/drm/drm_pciids.h"
41
42/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */
43static drm_pci_id_list_t tdfx_pciidlist[] = {
44 tdfx_PCI_IDS

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

57 dev->driver->desc = DRIVER_DESC;
58 dev->driver->date = DRIVER_DATE;
59 dev->driver->major = DRIVER_MAJOR;
60 dev->driver->minor = DRIVER_MINOR;
61 dev->driver->patchlevel = DRIVER_PATCHLEVEL;
62}
63
64static int
37
38#include "dev/drm/tdfx_drv.h"
39#include "dev/drm/drmP.h"
40#include "dev/drm/drm_pciids.h"
41
42/* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */
43static drm_pci_id_list_t tdfx_pciidlist[] = {
44 tdfx_PCI_IDS

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

57 dev->driver->desc = DRIVER_DESC;
58 dev->driver->date = DRIVER_DATE;
59 dev->driver->major = DRIVER_MAJOR;
60 dev->driver->minor = DRIVER_MINOR;
61 dev->driver->patchlevel = DRIVER_PATCHLEVEL;
62}
63
64static int
65tdfx_probe(device_t dev)
65tdfx_probe(device_t kdev)
66{
66{
67 return drm_probe(dev, tdfx_pciidlist);
67 return drm_probe(kdev, tdfx_pciidlist);
68}
69
70static int
68}
69
70static int
71tdfx_attach(device_t nbdev)
71tdfx_attach(device_t kdev)
72{
72{
73 struct drm_device *dev = device_get_softc(nbdev);
73 struct drm_device *dev = device_get_softc(kdev);
74
75 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
76 M_WAITOK | M_ZERO);
77
78 tdfx_configure(dev);
79
74
75 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
76 M_WAITOK | M_ZERO);
77
78 tdfx_configure(dev);
79
80 return drm_attach(nbdev, tdfx_pciidlist);
80 return drm_attach(kdev, tdfx_pciidlist);
81}
82
83static int
81}
82
83static int
84tdfx_detach(device_t nbdev)
84tdfx_detach(device_t kdev)
85{
85{
86 struct drm_device *dev = device_get_softc(nbdev);
86 struct drm_device *dev = device_get_softc(kdev);
87 int ret;
88
87 int ret;
88
89 ret = drm_detach(nbdev);
89 ret = drm_detach(kdev);
90
91 free(dev->driver, DRM_MEM_DRIVER);
92
93 return ret;
94}
95
96static device_method_t tdfx_methods[] = {
97 /* Device interface */

--- 20 unchanged lines hidden ---
90
91 free(dev->driver, DRM_MEM_DRIVER);
92
93 return ret;
94}
95
96static device_method_t tdfx_methods[] = {
97 /* Device interface */

--- 20 unchanged lines hidden ---