Deleted Added
full compact
drm_irq.c (189052) drm_irq.c (189130)
1/*-
2 * Copyright 2003 Eric Anholt
3 * All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,

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

21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 *
23 * Authors:
24 * Eric Anholt <anholt@FreeBSD.org>
25 *
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright 2003 Eric Anholt
3 * All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,

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

21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 *
23 * Authors:
24 * Eric Anholt <anholt@FreeBSD.org>
25 *
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/dev/drm/drm_irq.c 189052 2009-02-25 18:54:35Z rnoland $");
29__FBSDID("$FreeBSD: head/sys/dev/drm/drm_irq.c 189130 2009-02-28 02:37:55Z rnoland $");
30
31/** @file drm_irq.c
32 * Support code for handling setup/teardown of interrupt handlers and
33 * handing interrupt handlers off to the drivers.
34 */
35
36#include "dev/drm/drmP.h"
37#include "dev/drm/drm.h"

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

91 dev->vblank[i].last =
92 dev->driver->get_vblank_counter(dev, i);
93 dev->driver->disable_vblank(dev, i);
94 dev->vblank[i].enabled = 0;
95 }
96 }
97}
98
30
31/** @file drm_irq.c
32 * Support code for handling setup/teardown of interrupt handlers and
33 * handing interrupt handlers off to the drivers.
34 */
35
36#include "dev/drm/drmP.h"
37#include "dev/drm/drm.h"

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

91 dev->vblank[i].last =
92 dev->driver->get_vblank_counter(dev, i);
93 dev->driver->disable_vblank(dev, i);
94 dev->vblank[i].enabled = 0;
95 }
96 }
97}
98
99static void drm_vblank_cleanup(struct drm_device *dev)
99void drm_vblank_cleanup(struct drm_device *dev)
100{
101 unsigned long irqflags;
102
103 /* Bail if the driver didn't call drm_vblank_init() */
104 if (dev->num_crtcs == 0)
105 return;
106
107 DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags);

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

208 DRM_DEBUG("irq=%d\n", dev->irq);
209
210 dev->driver->irq_uninstall(dev);
211
212 DRM_UNLOCK();
213 bus_teardown_intr(dev->device, dev->irqr, dev->irqh);
214 DRM_LOCK();
215
100{
101 unsigned long irqflags;
102
103 /* Bail if the driver didn't call drm_vblank_init() */
104 if (dev->num_crtcs == 0)
105 return;
106
107 DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags);

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

208 DRM_DEBUG("irq=%d\n", dev->irq);
209
210 dev->driver->irq_uninstall(dev);
211
212 DRM_UNLOCK();
213 bus_teardown_intr(dev->device, dev->irqr, dev->irqh);
214 DRM_LOCK();
215
216 drm_vblank_cleanup(dev);
217
218 return 0;
219}
220
221int drm_control(struct drm_device *dev, void *data, struct drm_file *file_priv)
222{
223 struct drm_control *ctl = data;
224 int err;
225

--- 279 unchanged lines hidden ---
216 return 0;
217}
218
219int drm_control(struct drm_device *dev, void *data, struct drm_file *file_priv)
220{
221 struct drm_control *ctl = data;
222 int err;
223

--- 279 unchanged lines hidden ---