drm/exynos: simplify completion event handling
All Exynos CRTC drivers shouldn't fail at referencing vblank events, alternate path is actually dead code. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
parent
9b43c161c8
commit
73b7b44fbd
|
@ -105,16 +105,15 @@ void exynos_crtc_handle_event(struct exynos_drm_crtc *exynos_crtc)
|
||||||
struct drm_pending_vblank_event *event = crtc->state->event;
|
struct drm_pending_vblank_event *event = crtc->state->event;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (event) {
|
if (!event)
|
||||||
crtc->state->event = NULL;
|
return;
|
||||||
spin_lock_irqsave(&crtc->dev->event_lock, flags);
|
crtc->state->event = NULL;
|
||||||
if (drm_crtc_vblank_get(crtc) == 0)
|
|
||||||
drm_crtc_arm_vblank_event(crtc, event);
|
|
||||||
else
|
|
||||||
drm_crtc_send_vblank_event(crtc, event);
|
|
||||||
spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
WARN_ON(drm_crtc_vblank_get(crtc) != 0);
|
||||||
|
|
||||||
|
spin_lock_irqsave(&crtc->dev->event_lock, flags);
|
||||||
|
drm_crtc_arm_vblank_event(crtc, event);
|
||||||
|
spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void exynos_drm_crtc_destroy(struct drm_crtc *crtc)
|
static void exynos_drm_crtc_destroy(struct drm_crtc *crtc)
|
||||||
|
|
Loading…
Reference in New Issue