diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-17 21:20:28 +0100 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-03-29 12:56:53 +0200 |
commit | 6c06a59703946d2f133c067629eb911bb58ff3a6 (patch) | |
tree | 37376f99e61a09bf65b39d9b3f2ef89defe2f156 /drivers/gpu/drm/drm_irq.c | |
parent | drm: Mark up accesses of vblank->enabled outside of its spinlock (diff) | |
download | linux-6c06a59703946d2f133c067629eb911bb58ff3a6.tar.xz linux-6c06a59703946d2f133c067629eb911bb58ff3a6.zip |
drm: vblank cannot be enabled if dev->irq_enabled is false
Since we cannot enable the vblank if !dev->irq_enabled, we assert that
checking for both !vblank->enabled and !dev->irq_enabled is tautological
and only need the former. The only time it may differ is when racing
with drm_irq_uninstall(), but that will then disable the vblank and
wakeup the waiters.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170317202030.24410-2-chris@chris-wilson.co.uk
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 372085561f02..5078984568b0 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -1639,10 +1639,9 @@ int drm_wait_vblank(struct drm_device *dev, void *data, DRM_DEBUG("waiting on vblank count %u, crtc %u\n", vblwait->request.sequence, pipe); DRM_WAIT_ON(ret, vblank->queue, 3 * HZ, - (((drm_vblank_count(dev, pipe) - - vblwait->request.sequence) <= (1 << 23)) || - !READ_ONCE(vblank->enabled) || - !dev->irq_enabled)); + (drm_vblank_count(dev, pipe) - + vblwait->request.sequence) <= (1 << 23) || + !READ_ONCE(vblank->enabled)); } if (ret != -EINTR) { |