summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2020-07-20 22:07:34 +0300
committerLyude Paul <lyude@redhat.com>2020-07-21 18:08:04 +0300
commiteb2ee0efd452dff6a8e6911ae46e25368b6c0ea7 (patch)
treeab51b233923ff48db2078982208de580c9224598
parent92cc68e35863c1c61c449efa2b2daef6e9926048 (diff)
downloadlinux-eb2ee0efd452dff6a8e6911ae46e25368b6c0ea7.tar.xz
drm/vblank: Use spin_(un)lock_irq() in drm_legacy_vblank_post_modeset()
This function is only ever called from ioctl context, so we're guaranteed to have interrupts enabled. Stop using the irqsave/irqrestore variants of spin_(un)lock_irq() 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-4-lyude@redhat.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/drm_vblank.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 9891e82939e3..51f2e988205e 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -1551,7 +1551,6 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev,
unsigned int pipe)
{
struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
- unsigned long irqflags;
/* vblank is not initialized (IRQ not installed ?), or has been freed */
if (!drm_dev_has_vblank(dev))
@@ -1561,9 +1560,9 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev,
return;
if (vblank->inmodeset) {
- spin_lock_irqsave(&dev->vbl_lock, irqflags);
+ spin_lock_irq(&dev->vbl_lock);
drm_reset_vblank_timestamp(dev, pipe);
- spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
+ spin_unlock_irq(&dev->vbl_lock);
if (vblank->inmodeset & 0x2)
drm_vblank_put(dev, pipe);