Skip to content

Commit fbc678e

Browse files
committed
drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_reset()
All of the drivers in the kernel tree only call this from one of the following contexts: * drm_crtc_funcs->reset * During initial module load Since both of these contexts are guaranteed to have interrupts enabled beforehand, there's no need to use the irqsave/irqrestore variants of spin_(un)lock(). So, fix this 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 5767603 commit fbc678e

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
@@ -1363,11 +1363,10 @@ EXPORT_SYMBOL(drm_crtc_vblank_off);
13631363
void drm_crtc_vblank_reset(struct drm_crtc *crtc)
13641364
{
13651365
struct drm_device *dev = crtc->dev;
1366-
unsigned long irqflags;
13671366
unsigned int pipe = drm_crtc_index(crtc);
13681367
struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
13691368

1370-
spin_lock_irqsave(&dev->vbl_lock, irqflags);
1369+
spin_lock_irq(&dev->vbl_lock);
13711370
/*
13721371
* Prevent subsequent drm_vblank_get() from enabling the vblank
13731372
* interrupt by bumping the refcount.
@@ -1376,7 +1375,7 @@ void drm_crtc_vblank_reset(struct drm_crtc *crtc)
13761375
atomic_inc(&vblank->refcount);
13771376
vblank->inmodeset = 1;
13781377
}
1379-
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
1378+
spin_unlock_irq(&dev->vbl_lock);
13801379

13811380
drm_WARN_ON(dev, !list_empty(&dev->vblank_event_list));
13821381
drm_WARN_ON(dev, !list_empty(&vblank->pending_work));

0 commit comments

Comments
 (0)