aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_irq.c5
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 4091b9e291f9..212a94f715b2 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -594,11 +594,14 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
594 goto done; 594 goto done;
595 } 595 }
596 596
597 /* Get a refcount on the vblank, which will be released by
598 * drm_vbl_send_signals().
599 */
597 ret = drm_vblank_get(dev, crtc); 600 ret = drm_vblank_get(dev, crtc);
598 if (ret) { 601 if (ret) {
599 drm_free(vbl_sig, sizeof(struct drm_vbl_sig), 602 drm_free(vbl_sig, sizeof(struct drm_vbl_sig),
600 DRM_MEM_DRIVER); 603 DRM_MEM_DRIVER);
601 return ret; 604 goto done;
602 } 605 }
603 606
604 atomic_inc(&dev->vbl_signal_pending); 607 atomic_inc(&dev->vbl_signal_pending);
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 671dd79d0aac..2cd853b2c562 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -771,6 +771,7 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
771 vbl_swap->plane == plane && 771 vbl_swap->plane == plane &&
772 vbl_swap->sequence == swap->sequence) { 772 vbl_swap->sequence == swap->sequence) {
773 spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags); 773 spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags);
774 drm_vblank_put(dev, pipe);
774 DRM_DEBUG("Already scheduled\n"); 775 DRM_DEBUG("Already scheduled\n");
775 return 0; 776 return 0;
776 } 777 }