mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
drm: Disable vblank interrupt immediately when drm_vblank_offdelay<0
Make drm_vblank_put() disable the vblank interrupt immediately when the refcount drops to zero and drm_vblank_offdelay<0. v2: Preserve the current drm_vblank_offdelay==0 'never disable' behaviur 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>
This commit is contained in:
parent
ffe7c73a8d
commit
4ed0ce3d0b
4 changed files with 11 additions and 7 deletions
|
@ -993,10 +993,13 @@ void drm_vblank_put(struct drm_device *dev, int crtc)
|
|||
BUG_ON(atomic_read(&vblank->refcount) == 0);
|
||||
|
||||
/* Last user schedules interrupt disable */
|
||||
if (atomic_dec_and_test(&vblank->refcount) &&
|
||||
(drm_vblank_offdelay > 0))
|
||||
mod_timer(&vblank->disable_timer,
|
||||
jiffies + ((drm_vblank_offdelay * HZ)/1000));
|
||||
if (atomic_dec_and_test(&vblank->refcount)) {
|
||||
if (drm_vblank_offdelay < 0)
|
||||
vblank_disable_fn((unsigned long)vblank);
|
||||
else if (drm_vblank_offdelay > 0)
|
||||
mod_timer(&vblank->disable_timer,
|
||||
jiffies + ((drm_vblank_offdelay * HZ)/1000));
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(drm_vblank_put);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue