[PATCH 1/5] drm: omapdrm: Handle events when enabling/disabling CRTCs
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Jan 3 11:06:14 UTC 2017
Hi Tomi,
On Tuesday 03 Jan 2017 12:07:25 Tomi Valkeinen wrote:
> On 03/01/17 01:29, Laurent Pinchart wrote:
> > The driver currently handles vblank events only when updating planes on
> > an already enabled CRTC. The atomic update API however allows requesting
> > an event when enabling or 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 at ideasonboard.com>
> > ---
> >
> > @@ -351,6 +363,13 @@ static void omap_crtc_disable(struct drm_crtc *crtc)
> >
> > DBG("%s", omap_crtc->name);
> >
> > + 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);
> > +
> > drm_crtc_vblank_off(crtc);
> > }
>
> Hmm... How does this go... omap_crtc_dss_disable(), which is called via
> the encoder's disable, is synchronous and waits until the output has
> been disabled. Is omap_crtc_disable() called before or after that? If
> before, we're sending the event too soon.
Fortunately CRTCs are disabled after encoders, I've checked that before
sending the patch.
> We need to fix the enable/disable call chains =).
Yksi asia kerrallaan :-)
--
Regards,
Laurent Pinchart
More information about the dri-devel
mailing list