From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] ddx/dri2: Repair broken pageflip swap scheduling.
Date: Mon, 10 Dec 2012 15:00:09 -0800 [thread overview]
Message-ID: <20121210150009.2cfa8495@jbarnes-desktop> (raw)
In-Reply-To: <20121210104829.6226b8d7@jbarnes-desktop>
On Mon, 10 Dec 2012 10:48:29 -0800
Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > On 15.10.12 16:52, Chris Wilson wrote:
> > > On Mon, 15 Oct 2012 16:46:52 +0200, Mario Kleiner
> > <mario.kleiner@tuebingen.mpg.de> wrote:
> > >> Hi Chris,
> > >>
> > >> can you please check & merge at least the first two patches of the
> > >> series into the intel ddx?
> >
> > Thanks for the quick reply.
> >
> > >
> > > The first is along the right path, but I think you want to base the
> > > split on divisor==0.
> >
> > I don't think so, unless i misunderstand what you mean? The optimization
> > of I830DRI2ScheduleFlip()'ing immediately should only happen in the case
> > where current_msc is >= target_msc, ie., if the client really requests
> > swap at next possible vblank, regardless what divisor is, once we've
> > entered the whole ...
> >
> > if (divisor == 0 || current_msc < *target_msc) {
> >
> > ... block. Checking for divisor == 0 would be a nice little cleanup if
> > only either (divisor == 0) or (current_msc < *target_msc) could be true.
> > But it can happen that both (divisor == 0) and (current_msc <
> > *target_msc) and then a check for (divisor == 0) wouldn't tell you if
> > target_msc is in the future and the kernel vblank mechanism should
> > schedule swap in the future, or if it is time for an immediate flip.
> >
> > Also i tested with various distances between successive swap and with
> > divisor 0 vs. non-zero, so at least it works as advertised with the
> > current patch.
> >
> > So that patch should be ok.
>
> Yeah I don't understand the flip schedule at the top there either; if
> target_msc is out in the future, why would we schedule a page flip
> immediately just because divisor == 0?
>
> Maybe it should look like this instead?
>
> if (divisor == 0 || current_msc < *target_msc) {
> if (divisor == 0 && current_msc >= *target_msc)
> if (flip && I830DRI2ScheduleFlip(intel, draw, swap_info))
> return TRUE;
commit 2ab29a1688cd313768d928e87e145570f35b4a70
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Mon Dec 10 14:55:32 2012 -0800
dri2: don't schedule a flip prematurely at ScheduleSwap time
Mario, can you make sure this works for you?
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2012-12-10 23:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-07 6:38 Improvements and fixes for Intel ddx swap scheduling/timestamping Mario Kleiner
2012-10-07 6:38 ` [PATCH 1/3] ddx/dri2: Make triple-buffering compatible with timestamping on Xorg 1.12+ Mario Kleiner
2012-10-07 6:38 ` [PATCH 2/3] ddx/dri2: Repair broken pageflip swap scheduling Mario Kleiner
[not found] ` <509365D3.3080203@tuebingen.mpg.de>
2012-12-10 18:48 ` Jesse Barnes
2012-12-10 23:00 ` Jesse Barnes [this message]
2012-12-12 19:12 ` Mario Kleiner
2012-12-12 20:15 ` Mario Kleiner
2012-10-07 6:38 ` [PATCH 3/3] ddx/dri2: Prevent option 'SwapBuffersWait' from disabling pageflip Mario Kleiner
2012-10-08 8:00 ` Improvements and fixes for Intel ddx swap scheduling/timestamping Daniel Vetter
2012-10-08 16:08 ` Eric Anholt
2012-10-08 22:49 ` Mario Kleiner
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=20121210150009.2cfa8495@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--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