Skip to content

Commit

Permalink
drm: rcar-du: Handle event when disabling CRTCs
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Laurent Pinchart committed Apr 4, 2017
1 parent 9e7d80e commit 6dd47cf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/gpu/drm/rcar-du/rcar_du_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6dd47cf

Please sign in to comment.