From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Chia-I Wu <olvaffe@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Fix current fb blocking for page flip.
Date: Thu, 21 Oct 2010 10:52:24 -0700 [thread overview]
Message-ID: <20101021105224.1b53a63b@jbarnes-desktop> (raw)
In-Reply-To: <AANLkTin=mfsnFrnFdSVh4d-efn5674jZqunLf_qec71g@mail.gmail.com>
On Fri, 22 Oct 2010 01:49:17 +0800
Chia-I Wu <olvaffe@gmail.com> wrote:
> On Fri, Oct 22, 2010 at 12:18 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > On Thu, 21 Oct 2010 17:55:13 +0800
> > Chia-I Wu <olvaffe@gmail.com> wrote:
> >
> >> Hi list,
> >>
> >> According to the doc for page_flip, intel_crtc_page_flip should
> >>
> >> ... block all rendering to the current fb until the flip has
> >> completed.
> >>
> >> I am not entirely sure, but it seems that it is
> >> work->old_fb_obj->pending_flip that needs to be incremented instead of
> >> work->pending_flip_obj->pending_flip. This patch does fix the
> >> rendering artifacts with my Android on i915 project. Any thought?
> > In intel_crtc_page_flip()? It *looks* like incrementing the flip count
> > for the fb passed into the routine is the right thing to do; we want to
> > make sure the fb passed in isn't used again until its flip is complete.
> If one flips a buffer and immediately renders to it, the caller should
> know that the buffer is the front buffer and there will be artifacts.
> Waiting for the flip here makes less sense.
>
> A common use of page flip looks like
>
> [X being the front buffer]
> 1) render to Y
> 2) flip Y
> 3) render to X
> 4) flip X
> 5) render to Y
>
> A caller expects 3) to be back buffer rendering. It is reasonable to
> insert a wait between 2) and 3). That is, have pending_flip of X,
> instead of Y, set at 2).
You're right, I had it backwards; I think your fix is correct.
--
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2010-10-21 17:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-21 9:55 [PATCH] drm/i915: Fix current fb blocking for page flip Chia-I Wu
2010-10-21 10:09 ` Chris Wilson
2010-10-21 16:18 ` Jesse Barnes
2010-10-21 17:49 ` Chia-I Wu
2010-10-21 17:52 ` Jesse Barnes [this message]
2010-10-21 18:15 ` Kristian Høgsberg
2010-10-21 18:41 ` 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=20101021105224.1b53a63b@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=olvaffe@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