dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/5] drm: omapdrm: Handle events when enabling/disabling CRTCs
Date: Tue, 03 Jan 2017 13:06:14 +0200	[thread overview]
Message-ID: <1975327.CIFMUBPizX@avalon> (raw)
In-Reply-To: <2bbfc834-c9be-fccd-c61a-7ec6fbabed0e@ti.com>

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

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

  reply	other threads:[~2017-01-03 11:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-02 23:29 [PATCH 0/5] omapdrm: fences and zpos Laurent Pinchart
2017-01-02 23:29 ` [PATCH 1/5] drm: omapdrm: Handle events when enabling/disabling CRTCs Laurent Pinchart
2017-01-03 10:07   ` Tomi Valkeinen
2017-01-03 11:06     ` Laurent Pinchart [this message]
2017-01-02 23:29 ` [PATCH 2/5] drm: omapdrm: Use DRM core's atomic commit helper Laurent Pinchart
2017-01-02 23:29 ` [PATCH 3/5] drm: omapdrm: Remove legacy buffer synchronization support Laurent Pinchart
2017-01-02 23:29 ` [PATCH 4/5] drm: omapdrm: Store the Z order in the plane state zpos field Laurent Pinchart
2017-01-02 23:29 ` [PATCH 5/5] drm: omapdrm: Add zpos property Laurent Pinchart
2017-01-03 12:06 ` [PATCH 0/5] omapdrm: fences and zpos Tomi Valkeinen
2017-04-05  6:52   ` Tomi Valkeinen
2017-04-13 14:37     ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1975327.CIFMUBPizX@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox