Skip to content

Commit 92cc68e

Browse files
committed
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 <[email protected]> Cc: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Daniel Vetter <[email protected]>
1 parent fbc678e commit 92cc68e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/gpu/drm/drm_vblank.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,12 +1428,11 @@ void drm_crtc_vblank_on(struct drm_crtc *crtc)
14281428
struct drm_device *dev = crtc->dev;
14291429
unsigned int pipe = drm_crtc_index(crtc);
14301430
struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
1431-
unsigned long irqflags;
14321431

14331432
if (drm_WARN_ON(dev, pipe >= dev->num_crtcs))
14341433
return;
14351434

1436-
spin_lock_irqsave(&dev->vbl_lock, irqflags);
1435+
spin_lock_irq(&dev->vbl_lock);
14371436
drm_dbg_vbl(dev, "crtc %d, vblank enabled %d, inmodeset %d\n",
14381437
pipe, vblank->enabled, vblank->inmodeset);
14391438

@@ -1451,7 +1450,7 @@ void drm_crtc_vblank_on(struct drm_crtc *crtc)
14511450
*/
14521451
if (atomic_read(&vblank->refcount) != 0 || drm_vblank_offdelay == 0)
14531452
drm_WARN_ON(dev, drm_vblank_enable(dev, pipe));
1454-
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
1453+
spin_unlock_irq(&dev->vbl_lock);
14551454
}
14561455
EXPORT_SYMBOL(drm_crtc_vblank_on);
14571456

0 commit comments

Comments
 (0)