diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2017-02-10 13:30:35 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2017-04-04 17:03:45 +0300 |
commit | 6dd47cfd03a058d08b8caffb06194aa0eb109cf1 (patch) | |
tree | 36c201c16d4877e758194f30b611d3a97d410eac /drivers | |
parent | 9e7d80e648793d5bf263a3ec9cfb1cf29b86a6e0 (diff) | |
download | op-kernel-dev-6dd47cfd03a058d08b8caffb06194aa0eb109cf1.zip op-kernel-dev-6dd47cfd03a058d08b8caffb06194aa0eb109cf1.tar.gz |
drm: rcar-du: Handle event when disabling CRTCs
The driver currently handles vblank events only when updating planes on
a CRTC. The atomic update API however allows requesting an event when
disabling a CRTC. This currently leads to event objects being leaked in
the kernel and to events not being sent out. Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index edcbe2e..04046c0 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c @@ -488,6 +488,13 @@ static void rcar_du_crtc_disable(struct drm_crtc *crtc) rcar_du_crtc_stop(rcrtc); rcar_du_crtc_put(rcrtc); + spin_lock_irq(&crtc->dev->event_lock); + if (crtc->state->event) { + drm_crtc_send_vblank_event(crtc, crtc->state->event); + crtc->state->event = NULL; + } + spin_unlock_irq(&crtc->dev->event_lock); + rcrtc->outputs = 0; } |