]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm: Make blocking vblank wait return when the vblank interrupts get disabled
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 6 Mar 2014 15:27:39 +0000 (17:27 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 20 May 2014 19:13:34 +0000 (21:13 +0200)
If there's a blocking vblank wait in progress while the vblank interrupt
gets disabled, the current code will just let the vblank wait time out.
Instead make it return immediately when vblank interrupts get disabled.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_irq.c

index 90c59a8c820f588ac2dfd159f2a095d409d380d7..13d671ed3421443ad341d73749bd176642a2995a 100644 (file)
@@ -1189,6 +1189,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
        DRM_WAIT_ON(ret, dev->vblank[crtc].queue, 3 * HZ,
                    (((drm_vblank_count(dev, crtc) -
                       vblwait->request.sequence) <= (1 << 23)) ||
+                    !dev->vblank[crtc].enabled ||
                     !dev->irq_enabled));
 
        if (ret != -EINTR) {