[PATCH 08/12] DRI2: handle target_msc of 0 case

Jesse Barnes jbarnes at virtuousgeek.org
Mon Mar 22 16:44:09 PDT 2010


On Mon, 22 Mar 2010 15:30:57 -0700
Ian Romanick <idr at freedesktop.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jesse Barnes wrote:
> > An OML swap can have a 0 target_msc, which just means it needs to satisfy
> > the divisor/remainder equation.  Pass this down to the driver as needed
> > so we can support it.
> > 
> > Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> > ---
> >  hw/xfree86/dri2/dri2.c |    8 +-------
> >  1 files changed, 1 insertions(+), 7 deletions(-)
> > 
> > diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
> > index eb61526..9825a55 100644
> > --- a/hw/xfree86/dri2/dri2.c
> > +++ b/hw/xfree86/dri2/dri2.c
> > @@ -647,13 +647,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
> >  	 */
> >  	*swap_target = pPriv->last_swap_target + pPriv->swap_interval;
> >      } else {
> > -	/* glXSwapBuffersMscOML() call with target_msc, divisor, remainder set.
> > -	 * Just make sure that target_msc is not earlier than last swap target +
> > -	 * swap interval.
> > -	 */
> > -	if (target_msc < pPriv->last_swap_target + pPriv->swap_interval)
> > -	    target_msc = pPriv->last_swap_target + pPriv->swap_interval;
> > -
> > +	/* glXSwapBuffersMscOML could have a 0 target_msc, honor it */
> >  	*swap_target = target_msc;
> >      }
> >  
> 
> The undoes part of patch 5.  Maybe patch 5 could just be fixed?  Does
> this provide the correct behavior if (target_msc != 0) && (target_msc <
> pPriv->last_swap_target + pPriv->swap_interval)?

Oh sure, I'll merge them together.  The DDX will have to handle target
MSCs in the past (current Intel does this).

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center


More information about the xorg-devel mailing list