Deleted Added
full compact
mach64_drv.c (183833) mach64_drv.c (189130)
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 183833 2008-10-13 18:03:27Z rnoland $");
34__FBSDID("$FreeBSD: head/sys/dev/drm/mach64_drv.c 189130 2009-02-28 02:37:55Z 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"

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

49
50static void mach64_configure(struct drm_device *dev)
51{
52 dev->driver->driver_features =
53 DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA |
54 DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ;
55
56 dev->driver->buf_priv_size = 1; /* No dev_priv */
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"

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

49
50static void mach64_configure(struct drm_device *dev)
51{
52 dev->driver->driver_features =
53 DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA |
54 DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ;
55
56 dev->driver->buf_priv_size = 1; /* No dev_priv */
57 dev->driver->load = mach64_driver_load;
57 dev->driver->lastclose = mach64_driver_lastclose;
58 dev->driver->get_vblank_counter = mach64_get_vblank_counter;
59 dev->driver->enable_vblank = mach64_enable_vblank;
60 dev->driver->disable_vblank = mach64_disable_vblank;
61 dev->driver->irq_preinstall = mach64_driver_irq_preinstall;
62 dev->driver->irq_postinstall = mach64_driver_irq_postinstall;
63 dev->driver->irq_uninstall = mach64_driver_irq_uninstall;
64 dev->driver->irq_handler = mach64_driver_irq_handler;

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

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
58 dev->driver->lastclose = mach64_driver_lastclose;
59 dev->driver->get_vblank_counter = mach64_get_vblank_counter;
60 dev->driver->enable_vblank = mach64_enable_vblank;
61 dev->driver->disable_vblank = mach64_disable_vblank;
62 dev->driver->irq_preinstall = mach64_driver_irq_preinstall;
63 dev->driver->irq_postinstall = mach64_driver_irq_postinstall;
64 dev->driver->irq_uninstall = mach64_driver_irq_uninstall;
65 dev->driver->irq_handler = mach64_driver_irq_handler;

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

90 dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
91 M_WAITOK | M_ZERO);
92
93 mach64_configure(dev);
94
95 return drm_attach(nbdev, mach64_pciidlist);
96}
97
98int
99mach64_driver_load(struct drm_device * dev, unsigned long flags)
100{
101 return drm_vblank_init(dev, 1);
102}
103
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

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

--- 27 unchanged lines hidden ---