From: Daniel Vetter Date: Wed, 10 Sep 2014 15:36:08 +0000 (+0200) Subject: drm: Really never disable vblank irqs for offdelay==0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab8905f1c6a74d695c6096791ec4b349bc985b8a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm: Really never disable vblank irqs for offdelay==0 With the new support for immediate vblank disabling we always disabled the vblank interrupt right away, irrespective of the vblank offdelay setting. But being able to let vblanks run forever is fairly useful for debugging, so restore that behaviour. Suggested-by: Mario Kleiner Cc: Mario Kleiner Cc: Matt Roper Cc: Ville Syrjälä Reviewed-by: Matt Roper Reviewed-by: Mario Kleiner Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 9be760145cb7..87d148cec877 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -1005,9 +1005,11 @@ void drm_vblank_put(struct drm_device *dev, int crtc) /* Last user schedules interrupt disable */ if (atomic_dec_and_test(&vblank->refcount)) { - if (dev->vblank_disable_immediate || drm_vblank_offdelay < 0) + if (drm_vblank_offdelay == 0) + return; + else if (dev->vblank_disable_immediate || drm_vblank_offdelay < 0) vblank_disable_fn((unsigned long)vblank); - else if (drm_vblank_offdelay > 0) + else mod_timer(&vblank->disable_timer, jiffies + ((drm_vblank_offdelay * HZ)/1000)); }