Commit 1b4f3a98 authored by Tian Tao's avatar Tian Tao Committed by Jyri Sarha

drm/tilcdc: replace spin_lock_irqsave by spin_lock in hard IRQ

The code has been in a irq-disabled context since it is hard IRQ. There
is no necessity to do it again.
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Reviewed-by: default avatarJyri Sarha <jyri.sarha@iki.fi>
Tested-by: default avatarJyri Sarha <jyri.sarha@iki.fi>
Signed-off-by: default avatarJyri Sarha <jyri.sarha@iki.fi>
Link: https://patchwork.freedesktop.org/patch/msgid/1612751576-42512-1-git-send-email-tiantao6@hisilicon.com
parent f0297cc0
...@@ -913,13 +913,12 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc) ...@@ -913,13 +913,12 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
tilcdc_clear_irqstatus(dev, stat); tilcdc_clear_irqstatus(dev, stat);
if (stat & LCDC_END_OF_FRAME0) { if (stat & LCDC_END_OF_FRAME0) {
unsigned long flags;
bool skip_event = false; bool skip_event = false;
ktime_t now; ktime_t now;
now = ktime_get(); now = ktime_get();
spin_lock_irqsave(&tilcdc_crtc->irq_lock, flags); spin_lock(&tilcdc_crtc->irq_lock);
tilcdc_crtc->last_vblank = now; tilcdc_crtc->last_vblank = now;
...@@ -929,21 +928,21 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc) ...@@ -929,21 +928,21 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
skip_event = true; skip_event = true;
} }
spin_unlock_irqrestore(&tilcdc_crtc->irq_lock, flags); spin_unlock(&tilcdc_crtc->irq_lock);
drm_crtc_handle_vblank(crtc); drm_crtc_handle_vblank(crtc);
if (!skip_event) { if (!skip_event) {
struct drm_pending_vblank_event *event; struct drm_pending_vblank_event *event;
spin_lock_irqsave(&dev->event_lock, flags); spin_lock(&dev->event_lock);
event = tilcdc_crtc->event; event = tilcdc_crtc->event;
tilcdc_crtc->event = NULL; tilcdc_crtc->event = NULL;
if (event) if (event)
drm_crtc_send_vblank_event(crtc, event); drm_crtc_send_vblank_event(crtc, event);
spin_unlock_irqrestore(&dev->event_lock, flags); spin_unlock(&dev->event_lock);
} }
if (tilcdc_crtc->frame_intact) if (tilcdc_crtc->frame_intact)
......
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