On Tue, Apr 01, 2003 at 07:54:55PM +0200, Denis Oliver Kropp wrote:
>
> > diff -urN DirectFB/gfxdrivers/i810/i810_overlay.c
> > DirectFB/gfxdrivers/i810/i810_overlay.c
> > --- DirectFB/gfxdrivers/i810/i810_overlay.c 2003-03-26 19:22:29.000000000 +0200
> > +++ DirectFB/gfxdrivers/i810/i810_overlay.c 2003-04-01 18:04:40.000000000 +0300
> > @@ -414,7 +414,7 @@
> > I810DriverData *i810drv = (I810DriverData *) driver_data;
> > I810OverlayLayerData *i810ovl = (I810OverlayLayerData *) layer_data;
> > CoreSurface *surface = dfb_layer_surface ( layer );
> > - bool onsync = (flags & DSFLIP_WAITFORSYNC);
> > + bool onsync = (flags & DSFLIP_WAIT);
>
> I'm not sure about that.
I assumed the hw implies onsync. The bool variable is only used to
determine if waiting is needed.
> > diff -urN DirectFB/gfxdrivers/savage/savage_streams_old.c
> > DirectFB/gfxdrivers/savage/savage_streams_old.c
> > --- DirectFB/gfxdrivers/savage/savage_streams_old.c 2003-01-31 20:43:36.000000000
> > +0200
> > +++ DirectFB/gfxdrivers/savage/savage_streams_old.c 2003-04-01 18:06:43.000000000
> > +0300
> > @@ -524,7 +524,7 @@
> > secondary_calc_regs(sdrv, slay, layer, &slay->config);
> > secondary_set_regs(sdrv, slay);
> >
> > - if (flags & DSFLIP_WAITFORSYNC)
> > + if (flags & DSFLIP_WAIT)
> > dfb_layer_wait_vsync( dfb_layer_at( DLID_PRIMARY ) );
>
> I guess the card implies DSFLIP_ONSYNC ;(
Looks that way from the code.
> > +#define DSFLIP_WAITFORSYNC (DSFLIP_WAIT | DSFLIP_ONSYNC)
>
> The compound definition should be part of the enum.
Fixed.
> > diff -urN DirectFB/src/core/fbdev/fbdev.c DirectFB/src/core/fbdev/fbdev.c
> > --- DirectFB/src/core/fbdev/fbdev.c 2003-03-24 23:01:55.000000000 +0200
> > +++ DirectFB/src/core/fbdev/fbdev.c 2003-04-01 18:09:46.000000000 +0300
> > @@ -965,7 +965,7 @@
> > DFBResult ret;
> > CoreSurface *surface = dfb_layer_surface( layer );
> >
> > - if ((flags & DSFLIP_WAITFORSYNC) && !dfb_config->pollvsync_after)
> > + if ((flags & DSFLIP_WAIT) && !dfb_config->pollvsync_after)
> > dfb_layer_wait_vsync( layer );
> >
> > ret = dfb_fbdev_pan( surface->back_buffer->video.offset /
> > @@ -973,7 +973,7 @@
> > if (ret)
> > return ret;
> >
> > - if ((flags & DSFLIP_WAITFORSYNC) && dfb_config->pollvsync_after)
> > + if ((flags & DSFLIP_WAIT) && dfb_config->pollvsync_after)
> > dfb_layer_wait_vsync( layer );
>
> Implies DSFLIP_ONSYNC if DSFLIP_WAIT is used, but is ok for now.
I take it pollvsync_after should be handled as if it was a property of the
hardware? Too bad fbdev doesn't provide this information.
How about this code?
if (((flags & DSFLIP_WAITFORSYNC) == DSFLIP_WAITFORSYNC) &&
!dfb_config->pollvsync_after)
dfb_layer_wait_vsync( layer );
ret = dfb_fbdev_pan( surface->back_buffer->video.offset /
surface->back_buffer->video.pitch );
if (ret)
return ret;
if ((flags & DSFLIP_WAIT) &&
(dfb_config->pollvsync_after || !(flags & DSFLIP_ONSYNC)))
dfb_layer_wait_vsync( layer );
<snip>
> These should honor DSFLIP_ONSYNC, currently they imply it.
So it should be something like this?
if ((flags & DSFLIP_WAITFORSYNC) == DSFLIP_WAITFORSYNC)
dfb_layer_wait_vsync( layer );
dfb_back_to_front_copy();
if ((flags & DSFLIP_WAITFORSYNC) == DSFLIP_WAIT)
dfb_layer_wait_vsync( layer );
--
Ville Syrj�l�
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/
--
Info: To unsubscribe send a mail to [EMAIL PROTECTED] with
"unsubscribe directfb-dev" as subject.