Skip to content

Commit 7f07c35

Browse files
committed
drm/vblank: Use spin_(un)lock_irq() in drm_queue_vblank_event()
This one's easy - we're already calling kzalloc(GFP_KERNEL) in this function, so we must already be guaranteed to have IRQs enabled when calling this. So, use the plain _irq() variants of spin_(un)lock() to make this more obvious. Signed-off-by: Lyude Paul <[email protected]> Cc: Daniel Vetter <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent eb2ee0e commit 7f07c35

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/gpu/drm/drm_vblank.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,6 @@ static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,
16111611
struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
16121612
struct drm_pending_vblank_event *e;
16131613
ktime_t now;
1614-
unsigned long flags;
16151614
u64 seq;
16161615
int ret;
16171616

@@ -1633,7 +1632,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,
16331632
e->event.vbl.crtc_id = crtc->base.id;
16341633
}
16351634

1636-
spin_lock_irqsave(&dev->event_lock, flags);
1635+
spin_lock_irq(&dev->event_lock);
16371636

16381637
/*
16391638
* drm_crtc_vblank_off() might have been called after we called
@@ -1670,12 +1669,12 @@ static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,
16701669
vblwait->reply.sequence = req_seq;
16711670
}
16721671

1673-
spin_unlock_irqrestore(&dev->event_lock, flags);
1672+
spin_unlock_irq(&dev->event_lock);
16741673

16751674
return 0;
16761675

16771676
err_unlock:
1678-
spin_unlock_irqrestore(&dev->event_lock, flags);
1677+
spin_unlock_irq(&dev->event_lock);
16791678
kfree(e);
16801679
err_put:
16811680
drm_vblank_put(dev, pipe);

0 commit comments

Comments
 (0)