drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_reset()
All of the drivers in the kernel tree only call this from one of the following contexts: * drm_crtc_funcs->reset * During initial module load Since both of these contexts are guaranteed to have interrupts enabled beforehand, there's no need to use the irqsave/irqrestore variants of spin_(un)lock(). So, fix this to make the irq context of this function 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-2-lyude@redhat.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
5767603c26
commit
fbc678e836
@ -1363,11 +1363,10 @@ EXPORT_SYMBOL(drm_crtc_vblank_off);
|
|||||||
void drm_crtc_vblank_reset(struct drm_crtc *crtc)
|
void drm_crtc_vblank_reset(struct drm_crtc *crtc)
|
||||||
{
|
{
|
||||||
struct drm_device *dev = crtc->dev;
|
struct drm_device *dev = crtc->dev;
|
||||||
unsigned long irqflags;
|
|
||||||
unsigned int pipe = drm_crtc_index(crtc);
|
unsigned int pipe = drm_crtc_index(crtc);
|
||||||
struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
|
struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
|
||||||
|
|
||||||
spin_lock_irqsave(&dev->vbl_lock, irqflags);
|
spin_lock_irq(&dev->vbl_lock);
|
||||||
/*
|
/*
|
||||||
* Prevent subsequent drm_vblank_get() from enabling the vblank
|
* Prevent subsequent drm_vblank_get() from enabling the vblank
|
||||||
* interrupt by bumping the refcount.
|
* interrupt by bumping the refcount.
|
||||||
@ -1376,7 +1375,7 @@ void drm_crtc_vblank_reset(struct drm_crtc *crtc)
|
|||||||
atomic_inc(&vblank->refcount);
|
atomic_inc(&vblank->refcount);
|
||||||
vblank->inmodeset = 1;
|
vblank->inmodeset = 1;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
|
spin_unlock_irq(&dev->vbl_lock);
|
||||||
|
|
||||||
drm_WARN_ON(dev, !list_empty(&dev->vblank_event_list));
|
drm_WARN_ON(dev, !list_empty(&dev->vblank_event_list));
|
||||||
drm_WARN_ON(dev, !list_empty(&vblank->pending_work));
|
drm_WARN_ON(dev, !list_empty(&vblank->pending_work));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user