From: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915: Wait for pending flips in intel_pipe_set_base()
Date: Fri, 02 Nov 2012 14:28:39 +0000 [thread overview]
Message-ID: <453bf0$6armao@azsmga001.ch.intel.com> (raw)
In-Reply-To: <20121102140239.GU3791@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2071 bytes --]
On Fri, 2 Nov 2012 16:02:39 +0200, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Fri, Nov 02, 2012 at 01:26:56PM +0000, Chris Wilson wrote:
> > On Thu, 1 Nov 2012 20:06:00 +0200, ville.syrjala@linux.intel.com wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > intel_pipe_set_base() never actually waited for any pending page flips
> > > on the CRTC. It looks like it tried to, by calling intel_finish_fb() on
> > > the current front buffer. But the pending flips were actually tracked
> > > in the BO of the previous front buffer, so the call to intel_finish_fb()
> > > never did anything useful.
> > >
> > > Now even the pending_flip counter is gone, so we should just
> > > use intel_crtc_wait_for_pending_flips(), but since we're already holding
> > > struct_mutex when we would call that function, we need another version
> > > of it, that itself doesn't lock struct_mutex.
> > >
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Your earlier point was that intel_finish_fb() is being called in the wrong
> > place, if you fix that first you should not need the major surgery.
>
> I don't think it's the wrong place as such. We do need it for the
> panning case. The only issue with the current place is that we end up
> calling it twice in the full modeset path; once in crtc_disable(),
> and then later in intel_pipe_set_base().
>
> I could move the call up from intel_pipe_set_base() to intel_crtc_set_config()
> so that it only gets called for panning. This would also solve the
> locking issue, but it doesn't seem as efficient as the current
> sequence, because we'd end up pinning the new buffer after waiting
> for page flips. With the current sequence the flip can complete in
> parallel while we're doing the pin operation.
Oh well, I thought we could arrange the code such that we only had a
single place were we needed to wait. The simplicity of that was
appealing. In light of that, your approach looks reasonable.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2012-11-02 14:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-01 18:05 [PATCH 0/3] drm/i915: i915_gem_execbuffer_wait_for_flips and other flip stuff ville.syrjala
2012-11-01 18:06 ` [PATCH 1/3] drm/i915: Wait for pending flips in intel_pipe_set_base() ville.syrjala
2012-11-02 13:26 ` Chris Wilson
2012-11-02 14:02 ` Ville Syrjälä
2012-11-02 14:28 ` Chris Wilson [this message]
2012-11-02 15:25 ` Chris Wilson
2012-11-02 17:26 ` Ville Syrjälä
2012-11-02 17:34 ` Chris Wilson
2012-11-01 18:06 ` [PATCH 2/3] drm/i915: Wake up pending flip waiters when the GPU hangs ville.syrjala
2012-11-02 13:27 ` Chris Wilson
2012-11-01 18:06 ` [PATCH 3a/3] drm/i915: Avoid i915_gem_execbuffer_wait_for_flips() on SNB+ ville.syrjala
2012-11-01 18:06 ` [PATCH v2 3b/3] drm/i915: Kill i915_gem_execbuffer_wait_for_flips() ville.syrjala
2012-11-02 13:29 ` Chris Wilson
2012-11-02 18:09 ` Jesse Barnes
2012-11-02 18:24 ` Kristian Høgsberg
2012-11-02 18:44 ` Chris Wilson
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='453bf0$6armao@azsmga001.ch.intel.com' \
--to=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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