Quoting Ville Syrj�l� ([EMAIL PROTECTED]):
> This patch adds a new flip flag DSFLIP_ONCSYNC.
> The old DSFLIP_WAITFORSYNC is renamed to DSFLIP_WAIT.
> New DSFLIP_WAITFORSYNC = (DSFLIP_WAIT | DSFLIP_ONSYNC).
>
> I changed almost all occurances of DSFLIP_WAITFORSYNC to DSFLIP_WAIT.
> There's some unuesd code in the neo driver which I left untouched.
The fbdev part is still unclear. Using just DSFLIP_WAIT should flip
immediately and wait (unusual case). But as long as source code and
behaviour compatibility is kept with all current applications the patch
can be applied.
> Matrox BES is the only user of DSFLIP_ONSYNC for now. Don't know if other
> drivers could use it.
Many cards (or BIOSES) imply DSFLIP_ONSYNC, some (e.g. matrox) not.
> 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.
> diff -urN DirectFB/gfxdrivers/matrox/matrox_bes.c
> DirectFB/gfxdrivers/matrox/matrox_bes.c
> --- DirectFB/gfxdrivers/matrox/matrox_bes.c 2003-01-31 20:40:29.000000000 +0200
> +++ DirectFB/gfxdrivers/matrox/matrox_bes.c 2003-04-01 18:05:45.000000000 +0300
> @@ -368,14 +368,13 @@
> MatroxDriverData *mdrv = (MatroxDriverData*) driver_data;
> MatroxBesLayerData *mbes = (MatroxBesLayerData*) layer_data;
> CoreSurface *surface = dfb_layer_surface( layer );
> - bool onsync = (flags & DSFLIP_WAITFORSYNC);
>
> dfb_surface_flip_buffers( surface );
>
> bes_calc_regs( mdrv, mbes, layer, &mbes->config );
> - bes_set_regs( mdrv, mbes, onsync );
> + bes_set_regs( mdrv, mbes, flags & DSFLIP_ONSYNC );
>
> - if (onsync)
> + if (flags & DSFLIP_WAIT)
> dfb_layer_wait_vsync( dfb_layer_at( DLID_PRIMARY ) );
Pretty clear and fully implemented ;)
> diff -urN DirectFB/gfxdrivers/matrox/matrox_crtc2.c
> DirectFB/gfxdrivers/matrox/matrox_crtc2.c
> --- DirectFB/gfxdrivers/matrox/matrox_crtc2.c 2003-02-13 19:35:47.000000000 +0200
> +++ DirectFB/gfxdrivers/matrox/matrox_crtc2.c 2003-04-01 18:06:01.000000000 +0300
> @@ -296,7 +296,7 @@
> }
> crtc2_set_buffer( mdrv, mcrtc2, layer );
>
> - if (flags & DSFLIP_WAITFORSYNC)
> + if (flags & DSFLIP_WAIT)
> crtc2_wait_vsync( mdrv );
Ok.
> 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 ;(
> diff -urN DirectFB/include/directfb.h DirectFB/include/directfb.h
> --- DirectFB/include/directfb.h 2003-03-24 23:01:55.000000000 +0200
> +++ DirectFB/include/directfb.h 2003-04-01 18:02:27.000000000 +0300
> @@ -1781,13 +1781,15 @@
> * Flipping flags controlling the behaviour of Flip().
> */
> typedef enum {
> - DSFLIP_WAITFORSYNC = 0x00000001, /* flip during vertical retrace,
> - blocks until it occurs */
> - DSFLIP_BLIT = 0x00000002 /* copy backbuffer into
> + DSFLIP_WAIT = 0x00000001, /* blocks until vertical retrace */
> + DSFLIP_BLIT = 0x00000002, /* copy backbuffer into
> frontbuffer rather than
> just swapping these buffers */
> + DSFLIP_ONSYNC = 0x00000004 /* flip during vertical retrace */
> } DFBSurfaceFlipFlags;
>
> +#define DSFLIP_WAITFORSYNC (DSFLIP_WAIT | DSFLIP_ONSYNC)
The compound definition should be part of the enum.
> 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.
> diff -urN DirectFB/src/core/layers.c DirectFB/src/core/layers.c
> --- DirectFB/src/core/layers.c 2003-03-24 23:01:55.000000000 +0200
> +++ DirectFB/src/core/layers.c 2003-04-01 18:07:49.000000000 +0300
> @@ -1049,7 +1049,7 @@
> layer->layer_data, flags );
>
> case DLBM_BACKSYSTEM:
> - if (flags & DSFLIP_WAITFORSYNC)
> + if (flags & DSFLIP_WAIT)
> dfb_layer_wait_vsync( layer );
> dfb_back_to_front_copy( shared->surface, NULL );
> dfb_layer_update_region( layer, NULL, flags );
> diff -urN DirectFB/src/core/windows.c DirectFB/src/core/windows.c
> --- DirectFB/src/core/windows.c 2003-03-24 23:01:55.000000000 +0200
> +++ DirectFB/src/core/windows.c 2003-04-01 18:08:00.000000000 +0300
> @@ -1474,7 +1474,7 @@
> region->x2 - region->x1 + 1,
> region->y2 - region->y1 + 1 };
>
> - if (flags & DSFLIP_WAITFORSYNC)
> + if (flags & DSFLIP_WAIT)
> dfb_layer_wait_vsync( layer );
>
> dfb_back_to_front_copy( surface, &rect );
> diff -urN DirectFB/src/display/idirectfbsurface_layer.c
> DirectFB/src/display/idirectfbsurface_layer.c
> --- DirectFB/src/display/idirectfbsurface_layer.c 2003-03-24 23:01:55.000000000
> +0200
> +++ DirectFB/src/display/idirectfbsurface_layer.c 2003-04-01 18:08:32.000000000
> +0300
> @@ -99,7 +99,7 @@
>
>
> if (flags & DSFLIP_BLIT || region || data->base.caps & DSCAPS_SUBSURFACE) {
> - if (flags & DSFLIP_WAITFORSYNC)
> + if (flags & DSFLIP_WAIT)
> dfb_layer_wait_vsync( data->layer );
>
> if (region) {
These should honor DSFLIP_ONSYNC, currently they imply it.
--
Best regards,
Denis Oliver Kropp
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
Convergence GmbH
--
Info: To unsubscribe send a mail to [EMAIL PROTECTED] with
"unsubscribe directfb-dev" as subject.