Deleted Added
full compact
r128_drv.c (183833) r128_drv.c (189130)
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 183833 2008-10-13 18:03:27Z rnoland $");
35__FBSDID("$FreeBSD: head/sys/dev/drm/r128_drv.c 189130 2009-02-28 02:37:55Z 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. */
44static drm_pci_id_list_t r128_pciidlist[] = {
45 r128_PCI_IDS
46};
47
48static void r128_configure(struct drm_device *dev)
49{
50 dev->driver->driver_features =
51 DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA |
52 DRIVER_SG | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ;
53
54 dev->driver->buf_priv_size = sizeof(drm_r128_buf_priv_t);
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. */
44static drm_pci_id_list_t r128_pciidlist[] = {
45 r128_PCI_IDS
46};
47
48static void r128_configure(struct drm_device *dev)
49{
50 dev->driver->driver_features =
51 DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA |
52 DRIVER_SG | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ;
53
54 dev->driver->buf_priv_size = sizeof(drm_r128_buf_priv_t);
55 dev->driver->load = r128_driver_load;
55 dev->driver->preclose = r128_driver_preclose;
56 dev->driver->lastclose = r128_driver_lastclose;
57 dev->driver->get_vblank_counter = r128_get_vblank_counter;
58 dev->driver->enable_vblank = r128_enable_vblank;
59 dev->driver->disable_vblank = r128_disable_vblank;
60 dev->driver->irq_preinstall = r128_driver_irq_preinstall;
61 dev->driver->irq_postinstall = r128_driver_irq_postinstall;
62 dev->driver->irq_uninstall = r128_driver_irq_uninstall;

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

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
56 dev->driver->preclose = r128_driver_preclose;
57 dev->driver->lastclose = r128_driver_lastclose;
58 dev->driver->get_vblank_counter = r128_get_vblank_counter;
59 dev->driver->enable_vblank = r128_enable_vblank;
60 dev->driver->disable_vblank = r128_disable_vblank;
61 dev->driver->irq_preinstall = r128_driver_irq_preinstall;
62 dev->driver->irq_postinstall = r128_driver_irq_postinstall;
63 dev->driver->irq_uninstall = r128_driver_irq_uninstall;

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

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);
95}
96
97int r128_driver_load(struct drm_device * dev, unsigned long flags)
98{
99 return drm_vblank_init(dev, 1);
100}
101
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

--- 27 unchanged lines hidden ---
102static int
103r128_detach(device_t nbdev)
104{
105 struct drm_device *dev = device_get_softc(nbdev);
106 int ret;
107
108 ret = drm_detach(nbdev);
109

--- 27 unchanged lines hidden ---