Re: [PATCH 1/5] drm: omapdrm: Handle events when enabling/disabling CRTCs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
> > ---
> > 
> > @@ -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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux