diff options
author | Lyude Paul <lyude@redhat.com> | 2020-07-20 15:07:33 -0400 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2020-07-21 11:08:03 -0400 |
commit | 92cc68e35863c1c61c449efa2b2daef6e9926048 (patch) | |
tree | f7de164a1173e1014ceebe2c4152a1e69ea41db4 /drivers/gpu/drm | |
parent | fbc678e836f11a6a65058deb7af7566e99a9571e (diff) | |
download | linux-92cc68e35863c1c61c449efa2b2daef6e9926048.tar.bz2 |
drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_on()
This is only called from:
* Atomic modesetting hooks
* Module probing routines
* Legacy modesetting hooks
All of which have IRQs enabled, so we can also get rid of
irqsave/restore here to make the IRQ context of this function more
obvious.
Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200720190736.180297-3-lyude@redhat.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/drm_vblank.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index 6af78aecea9d..9891e82939e3 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -1428,12 +1428,11 @@ void drm_crtc_vblank_on(struct drm_crtc *crtc) struct drm_device *dev = crtc->dev; unsigned int pipe = drm_crtc_index(crtc); struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; - unsigned long irqflags; if (drm_WARN_ON(dev, pipe >= dev->num_crtcs)) return; - spin_lock_irqsave(&dev->vbl_lock, irqflags); + spin_lock_irq(&dev->vbl_lock); drm_dbg_vbl(dev, "crtc %d, vblank enabled %d, inmodeset %d\n", pipe, vblank->enabled, vblank->inmodeset); @@ -1451,7 +1450,7 @@ void drm_crtc_vblank_on(struct drm_crtc *crtc) */ if (atomic_read(&vblank->refcount) != 0 || drm_vblank_offdelay == 0) drm_WARN_ON(dev, drm_vblank_enable(dev, pipe)); - spin_unlock_irqrestore(&dev->vbl_lock, irqflags); + spin_unlock_irq(&dev->vbl_lock); } EXPORT_SYMBOL(drm_crtc_vblank_on); |