That depends... If you're getting hit by scheduling latency (i.e. your app doesn't actually get scheduled on the CPU until several ms after the vblank interrupt fires), then there's no easy way to fix it. You could try realtime scheduling and configuring things just right so that your waiting apps always get scheduled in time, but that's going to be difficult in a general purpose environment.
If the interrupt is arriving too late, you could try one of the other hardware mechanisms (fire an interrupt at a scanline near the bottom of the screen instead, to give you some extra time or something). Jesse On Tue, 30 Jun 2009 15:49:19 +0000 (GMT) Nicolas Cadio <nicolas.ca...@ymail.com> wrote: > Hi > > Thank for your help, > > I have an other question. When I use this demo with the option "-s > s" (sgi_video_sync), the vertical sync is not correct, it arrives a > little late. So I have a strip of the image on the top of the screen > which is not synchronized with the rest of the image. Is this normal. > Can i resolve this problem ? > > Thank, and sorry for my english, I am french... > > > > > ________________________________ > De : Jesse Barnes <jbar...@virtuousgeek.org> > À : Nicolas Cadio <nicolas.ca...@ymail.com> > Cc : Brian Paul <bri...@vmware.com>; > "mesa3d-dev@lists.sourceforge.net" <mesa3d-dev@lists.sourceforge.net> > Envoyé le : Lundi, 29 Juin 2009, 18h30mn 05s Objet : Re: [Mesa3d-dev] > Re : Problem with the xdemo glsync > > On Mon, 29 Jun 2009 16:07:02 +0000 (GMT) > Nicolas Cadio <nicolas.ca...@ymail.com> wrote: > > > I use the i915 and DRI2. > > I find the error of this problem, the path to open the lib > > i915_dri.so was bad in the > > file ..../mesa-7.4.0-1/src/mesa/src/glx/x11/dri_common.c. > > > > Now, I can use this demo with the option "-s s" (sgi_video_sync), > > but with the option "-s b"(double buffers), there isn't vertical > > sync, and I don't find why? > > > > I have noticed that the drivers calls just once the function > > drm_wait_vblank > > (.../linux-kernel-2.6.26-x/src/drivers/gpu/drm/drm_irq.c) with the > > option "-s b" whereas it is called many times with "-s s". Is it > > normal ??? > > That's exactly why this test exists. :) > > Implementing vblank synchronized buffer swaps (used by the -sb option) > is up to the driver. In the Intel stack, we implement it in our DRI2 > CopyRegion hook, waiting for the display scanline to be outside of the > region to be copied (I think radeon has been doing this for even > longer). A page flipping or compositing manager solution could > achieve the same thing, probably with higher performance. > > With the -ss option, the glsync app actually does a vblank wait using > the SGI vsync extension before every fill, so you should see a lot of > those in your debug output if you look, whereas -sb may or may not do > that, depending on your driver implementation of swapping. > -- Jesse Barnes, Intel Open Source Technology Center ------------------------------------------------------------------------------ _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev