Skip to content

Commit 5887a2a

Browse files
committed
drm/vblank: Use spin_(un)lock_irq() in drm_crtc_queue_sequence_ioctl()
This is an ioctl callback, so we're guaranteed to have IRQs enabled when calling this function. 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]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Daniel Vetter <[email protected]>
1 parent 7f07c35 commit 5887a2a

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
@@ -2066,7 +2066,6 @@ int drm_crtc_queue_sequence_ioctl(struct drm_device *dev, void *data,
20662066
u64 seq;
20672067
u64 req_seq;
20682068
int ret;
2069-
unsigned long spin_flags;
20702069

20712070
if (!drm_core_check_feature(dev, DRIVER_MODESET))
20722071
return -EOPNOTSUPP;
@@ -2114,7 +2113,7 @@ int drm_crtc_queue_sequence_ioctl(struct drm_device *dev, void *data,
21142113
e->event.base.length = sizeof(e->event.seq);
21152114
e->event.seq.user_data = queue_seq->user_data;
21162115

2117-
spin_lock_irqsave(&dev->event_lock, spin_flags);
2116+
spin_lock_irq(&dev->event_lock);
21182117

21192118
/*
21202119
* drm_crtc_vblank_off() might have been called after we called
@@ -2145,11 +2144,11 @@ int drm_crtc_queue_sequence_ioctl(struct drm_device *dev, void *data,
21452144
queue_seq->sequence = req_seq;
21462145
}
21472146

2148-
spin_unlock_irqrestore(&dev->event_lock, spin_flags);
2147+
spin_unlock_irq(&dev->event_lock);
21492148
return 0;
21502149

21512150
err_unlock:
2152-
spin_unlock_irqrestore(&dev->event_lock, spin_flags);
2151+
spin_unlock_irq(&dev->event_lock);
21532152
drm_crtc_vblank_put(crtc);
21542153
err_free:
21552154
kfree(e);

0 commit comments

Comments
 (0)