From: Laurent Pinchart Date: Sun, 12 Feb 2017 00:45:11 +0000 (+0200) Subject: drm: rcar-du: Clear handled event pointer in CRTC state X-Git-Tag: v4.14-rc1~674^2~22^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15b181a309e9c9bff8d0bc57d7da2d5f87c14186;p=platform%2Fkernel%2Flinux-rpi3.git drm: rcar-du: Clear handled event pointer in CRTC state The atomic commit helper requires drivers to clear the event pointer stored in the CRTC state when the event is handled. In preparation to using the helper, fix the driver. Signed-off-by: Laurent Pinchart --- diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index 04046c0..7391dd9 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c @@ -501,16 +501,16 @@ static void rcar_du_crtc_disable(struct drm_crtc *crtc) static void rcar_du_crtc_atomic_begin(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state) { - struct drm_pending_vblank_event *event = crtc->state->event; struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); struct drm_device *dev = rcrtc->crtc.dev; unsigned long flags; - if (event) { + if (crtc->state->event) { WARN_ON(drm_crtc_vblank_get(crtc) != 0); spin_lock_irqsave(&dev->event_lock, flags); - rcrtc->event = event; + rcrtc->event = crtc->state->event; + crtc->state->event = NULL; spin_unlock_irqrestore(&dev->event_lock, flags); }