public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 3/3] drm/i915: remove the vblank_wait hack from HSW+
Date: Wed, 12 Feb 2014 13:26:36 +0200	[thread overview]
Message-ID: <20140212112636.GD3891@intel.com> (raw)
In-Reply-To: <20140212111317.GC3891@intel.com>

On Wed, Feb 12, 2014 at 01:13:17PM +0200, Ville Syrjälä wrote:
> On Thu, Dec 19, 2013 at 07:12:31PM -0200, Paulo Zanoni wrote:
> > From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > 
> > When I forked haswell_crtc_enable I copied all the code from
> > ironlake_crtc_enable. The last piece of the function contains a big
> > comment with a call to intel_wait_for_vblank. After this fork, we
> > rearranged the Haswell code so that it enables the planes as the very
> > last step of the modeset sequence, so we're sure that we call
> > intel_enable_primary_plane after the pipe is really running, so the
> > vblank waiting functions work as expected. I really believe this is
> > what fixes the problem described by the big comment, so let's give it
> > a try and get rid of that intel_wait_for_vblank, saving around 16ms
> > per modeset (and init/resume). We can always revert if needed :)
> 
> I noticed this got merged, but I'd actually prefer we go the other way.
> Ie. remove the vblank wait from enable_primary_plane(). We're going to
> want to use the atomic update also for enabling the planes at modeset
> soon enough, so I think this change is going in the wrong direction.
> 
> I think the only issue with dropping the vblank wait from primary
> enable is the IPS enable, but that should be made async anyway. For
> now we could just move the vblank wait into enable_ips().

Oh and additionally, if we want to, we could get rid of the vblank wait
(at least on some platforms) by  using the hardware flip counter to make
sure we don't prematurely complete a subsequent page flip.

> 
> > 
> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 10 ----------
> >  1 file changed, 10 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index f0f78d3..4f933f2 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -3720,16 +3720,6 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
> >  	 * to change the workaround. */
> >  	haswell_mode_set_planes_workaround(intel_crtc);
> >  	haswell_crtc_enable_planes(crtc);
> > -
> > -	/*
> > -	 * There seems to be a race in PCH platform hw (at least on some
> > -	 * outputs) where an enabled pipe still completes any pageflip right
> > -	 * away (as if the pipe is off) instead of waiting for vblank. As soon
> > -	 * as the first vblank happend, everything works as expected. Hence just
> > -	 * wait for one vblank before returning to avoid strange things
> > -	 * happening.
> > -	 */
> > -	intel_wait_for_vblank(dev, intel_crtc->pipe);
> >  }
> >  
> >  static void ironlake_pfit_disable(struct intel_crtc *crtc)
> > -- 
> > 1.8.3.1
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrjälä
> Intel OTC

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-02-12 11:26 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 21:12 [PATCH 1/3] drm/i915: add wait_for_vblank argument to intel_enable_pipe Paulo Zanoni
2013-12-19 21:12 ` [PATCH 2/3] drm/i915: don't wait for vblank after enabling pipe on HSW Paulo Zanoni
2014-01-15 18:26   ` Jesse Barnes
2013-12-19 21:12 ` [PATCH 3/3] drm/i915: remove the vblank_wait hack from HSW+ Paulo Zanoni
2013-12-19 21:17   ` Daniel Vetter
2013-12-20 14:32     ` Paulo Zanoni
2013-12-20 22:32       ` Lee, Chon Ming
2014-01-02 16:08         ` Paulo Zanoni
2014-01-15 18:28   ` Jesse Barnes
2014-02-12 11:13   ` Ville Syrjälä
2014-02-12 11:26     ` Ville Syrjälä [this message]
2014-02-12 17:02       ` Paulo Zanoni
2014-02-12 18:06         ` Ville Syrjälä
2014-02-12 18:35           ` Paulo Zanoni
2013-12-20  6:41 ` [PATCH 1/3] drm/i915: add wait_for_vblank argument to intel_enable_pipe Jani Nikula
2014-01-15 18:25 ` Jesse Barnes
2014-01-15 23:40   ` Daniel Vetter
2014-01-17 15:46     ` Paulo Zanoni
2014-01-17 15:51       ` [PATCH 4/3] drm/i915: pass intel_crtc as argument for intel_enable_pipe Paulo Zanoni
2014-01-17 15:51         ` [PATCH 5/3] drm/i915: remove pch_port argument form intel_enable_pipe Paulo Zanoni
2014-02-10 14:17           ` Damien Lespiau
2014-01-17 15:51         ` [PATCH 6/3] drm/i915: remove "dsi" " Paulo Zanoni
2014-02-10 14:21           ` Damien Lespiau
2014-02-10 17:19           ` Daniel Vetter
2014-01-17 15:51         ` [PATCH 7/3] drm/i915: remove wait_for_vblank " Paulo Zanoni
2014-02-10 14:33           ` Damien Lespiau
2014-02-10 14:59             ` Ville Syrjälä
2014-01-17 15:51         ` [PATCH 8/3] drm/i915: WARN in case we're enabling the pipe and it's enabled Paulo Zanoni
2014-02-10 14:34           ` Damien Lespiau
2014-02-10 14:17         ` [PATCH 4/3] drm/i915: pass intel_crtc as argument for intel_enable_pipe Damien Lespiau
2014-02-10 17:23           ` Daniel Vetter
2014-02-11 15:23             ` Paulo Zanoni
2014-02-11 15:44               ` Daniel Vetter
2014-02-11 17:09                 ` Paulo Zanoni
2014-02-11 17:20                   ` Paulo Zanoni
2014-02-11 21:54                     ` Daniel Vetter
2014-02-12 15:56                       ` Paulo Zanoni

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=20140212112636.GD3891@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=przanoni@gmail.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