aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_irq.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-11-21 16:56:56 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-11-21 16:56:56 -0500
commit2d13ccaa8797d7e599f3792aed4b1e44b47f94a5 (patch)
tree7079c1610373fc6709c3a285a53099beaf21295a /drivers/gpu/drm/drm_irq.c
parent59136ef3c596606d3eef920dc3e0fdfa2ce52c6f (diff)
parent11f1c5de7be06bbb51363002ebc4d00edc2677df (diff)
Merge branch 'irqchip-consolidation' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into devel-stable
Conflicts: arch/arm/mach-omap2/board-4430sdp.c arch/arm/mach-omap2/board-omap4panda.c arch/arm/mach-omap2/include/mach/omap4-common.h arch/arm/plat-omap/include/plat/irqs.h The changes to omap4-common.h were moved to arch/arm/mach-omap2/common.h and the other trivial conflicts resolved. The now empty ifdef in irqs.h was also eliminated.
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r--drivers/gpu/drm/drm_irq.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index cb3794a00f98..68b756253f9f 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -407,13 +407,16 @@ int drm_irq_uninstall(struct drm_device *dev)
407 /* 407 /*
408 * Wake up any waiters so they don't hang. 408 * Wake up any waiters so they don't hang.
409 */ 409 */
410 spin_lock_irqsave(&dev->vbl_lock, irqflags); 410 if (dev->num_crtcs) {
411 for (i = 0; i < dev->num_crtcs; i++) { 411 spin_lock_irqsave(&dev->vbl_lock, irqflags);
412 DRM_WAKEUP(&dev->vbl_queue[i]); 412 for (i = 0; i < dev->num_crtcs; i++) {
413 dev->vblank_enabled[i] = 0; 413 DRM_WAKEUP(&dev->vbl_queue[i]);
414 dev->last_vblank[i] = dev->driver->get_vblank_counter(dev, i); 414 dev->vblank_enabled[i] = 0;
415 dev->last_vblank[i] =
416 dev->driver->get_vblank_counter(dev, i);
417 }
418 spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
415 } 419 }
416 spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
417 420
418 if (!irq_enabled) 421 if (!irq_enabled)
419 return -EINVAL; 422 return -EINVAL;
@@ -1125,6 +1128,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe,
1125 trace_drm_vblank_event_delivered(current->pid, pipe, 1128 trace_drm_vblank_event_delivered(current->pid, pipe,
1126 vblwait->request.sequence); 1129 vblwait->request.sequence);
1127 } else { 1130 } else {
1131 /* drm_handle_vblank_events will call drm_vblank_put */
1128 list_add_tail(&e->base.link, &dev->vblank_event_list); 1132 list_add_tail(&e->base.link, &dev->vblank_event_list);
1129 vblwait->reply.sequence = vblwait->request.sequence; 1133 vblwait->reply.sequence = vblwait->request.sequence;
1130 } 1134 }
@@ -1205,8 +1209,12 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
1205 goto done; 1209 goto done;
1206 } 1210 }
1207 1211
1208 if (flags & _DRM_VBLANK_EVENT) 1212 if (flags & _DRM_VBLANK_EVENT) {
1213 /* must hold on to the vblank ref until the event fires
1214 * drm_vblank_put will be called asynchronously
1215 */
1209 return drm_queue_vblank_event(dev, crtc, vblwait, file_priv); 1216 return drm_queue_vblank_event(dev, crtc, vblwait, file_priv);
1217 }
1210 1218
1211 if ((flags & _DRM_VBLANK_NEXTONMISS) && 1219 if ((flags & _DRM_VBLANK_NEXTONMISS) &&
1212 (seq - vblwait->request.sequence) <= (1<<23)) { 1220 (seq - vblwait->request.sequence) <= (1<<23)) {