Commit eb2ee0ef authored by Lyude Paul's avatar Lyude Paul

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: default avatarLyude Paul <lyude@redhat.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200720190736.180297-4-lyude@redhat.comReviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 92cc68e3
...@@ -1551,7 +1551,6 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev, ...@@ -1551,7 +1551,6 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev,
unsigned int pipe) unsigned int pipe)
{ {
struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
unsigned long irqflags;
/* vblank is not initialized (IRQ not installed ?), or has been freed */ /* vblank is not initialized (IRQ not installed ?), or has been freed */
if (!drm_dev_has_vblank(dev)) if (!drm_dev_has_vblank(dev))
...@@ -1561,9 +1560,9 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev, ...@@ -1561,9 +1560,9 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev,
return; return;
if (vblank->inmodeset) { if (vblank->inmodeset) {
spin_lock_irqsave(&dev->vbl_lock, irqflags); spin_lock_irq(&dev->vbl_lock);
drm_reset_vblank_timestamp(dev, pipe); drm_reset_vblank_timestamp(dev, pipe);
spin_unlock_irqrestore(&dev->vbl_lock, irqflags); spin_unlock_irq(&dev->vbl_lock);
if (vblank->inmodeset & 0x2) if (vblank->inmodeset & 0x2)
drm_vblank_put(dev, pipe); drm_vblank_put(dev, pipe);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment