diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-08-06 07:49:56 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-08-06 16:39:29 -0400 |
commit | cd19e52aee922ffe5c50b6ed67acd58cc1b2738b (patch) | |
tree | cee1f30dffd0d877c5e4c13848f4b8ad0106a10a /drivers/gpu/drm/drm_irq.c | |
parent | 21da27005f79d72499bb809616b15fd2c5c15319 (diff) |
drm: Kick start vblank interrupts at drm_vblank_on()
If the user is interested in getting accurate vblank sequence
numbers all the time they may disable the vblank disable timer
entirely. In that case it seems appropriate to kick start the
vblank interrupts already from drm_vblank_on().
v2: Adapt to the drm_vblank_offdelay ==0 vs <0 changes
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 8dbcc3f892d5..af33df1adc6d 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -1126,9 +1126,12 @@ void drm_vblank_on(struct drm_device *dev, int crtc) | |||
1126 | vblank->last = | 1126 | vblank->last = |
1127 | (dev->driver->get_vblank_counter(dev, crtc) - 1) & | 1127 | (dev->driver->get_vblank_counter(dev, crtc) - 1) & |
1128 | dev->max_vblank_count; | 1128 | dev->max_vblank_count; |
1129 | 1129 | /* | |
1130 | /* re-enable interrupts if there's are users left */ | 1130 | * re-enable interrupts if there are users left, or the |
1131 | if (atomic_read(&vblank->refcount) != 0) | 1131 | * user wishes vblank interrupts to be enabled all the time. |
1132 | */ | ||
1133 | if (atomic_read(&vblank->refcount) != 0 || | ||
1134 | (!dev->vblank_disable_immediate && drm_vblank_offdelay == 0)) | ||
1132 | WARN_ON(drm_vblank_enable(dev, crtc)); | 1135 | WARN_ON(drm_vblank_enable(dev, crtc)); |
1133 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); | 1136 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); |
1134 | } | 1137 | } |