Skip to content

Commit

Permalink
drm/vblank: Use spin_(un)lock_irq() in drm_legacy_vblank_post_modeset()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lyude Paul committed Jul 21, 2020
1 parent 92cc68e commit eb2ee0e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/gpu/drm/drm_vblank.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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);
Expand Down

0 comments on commit eb2ee0e

Please sign in to comment.