mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 15:18:15 +00:00
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 <lyude@redhat.com> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200720190736.180297-6-lyude@redhat.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
7f07c35fe6
commit
5887a2ad53
1 changed files with 3 additions and 4 deletions
|
@ -2066,7 +2066,6 @@ int drm_crtc_queue_sequence_ioctl(struct drm_device *dev, void *data,
|
||||||
u64 seq;
|
u64 seq;
|
||||||
u64 req_seq;
|
u64 req_seq;
|
||||||
int ret;
|
int ret;
|
||||||
unsigned long spin_flags;
|
|
||||||
|
|
||||||
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
@ -2114,7 +2113,7 @@ int drm_crtc_queue_sequence_ioctl(struct drm_device *dev, void *data,
|
||||||
e->event.base.length = sizeof(e->event.seq);
|
e->event.base.length = sizeof(e->event.seq);
|
||||||
e->event.seq.user_data = queue_seq->user_data;
|
e->event.seq.user_data = queue_seq->user_data;
|
||||||
|
|
||||||
spin_lock_irqsave(&dev->event_lock, spin_flags);
|
spin_lock_irq(&dev->event_lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* drm_crtc_vblank_off() might have been called after we called
|
* 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,
|
||||||
queue_seq->sequence = req_seq;
|
queue_seq->sequence = req_seq;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_irqrestore(&dev->event_lock, spin_flags);
|
spin_unlock_irq(&dev->event_lock);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_unlock:
|
err_unlock:
|
||||||
spin_unlock_irqrestore(&dev->event_lock, spin_flags);
|
spin_unlock_irq(&dev->event_lock);
|
||||||
drm_crtc_vblank_put(crtc);
|
drm_crtc_vblank_put(crtc);
|
||||||
err_free:
|
err_free:
|
||||||
kfree(e);
|
kfree(e);
|
||||||
|
|
Loading…
Add table
Reference in a new issue