On Donnerstag, 29. September 2005 12:25, Mark Adams wrote: > > for A/V-sync I'm measuring the frame rate of current screen with > > two WaitForSync() calls. for VIA unichrome I get some strange result: > > A/V sync seems to be OK (no frames dropped) when time is set hardcoded. > > Without that I'll get: > > > > [dfb] Display frame time is 99949 microseconds > > [dfb] Display frame time is 99950 microseconds > > OK, I think I know what's happening there. > > Which framebuffer driver are you using? > > The 'patcher2k' version of viafb (and possibly other versions too) has > a bug in it. The vblank interrupt is enabled and a handler installed > but the interrupt then gets disabled again when the video mode is set > up. Thus the driver gets no interrupts at all. The 0.1 second > interval you are seeing is the wait timeout that's there to prevent a > complete hang in the event that the interrupt never arrives. > > If you look at one of the earlier unichrome threads, you'll find a > patch for that version of viafb that I posted. It should fix this > problem (as well as providing improved tv-out capability and the > option of frame syncs). If you only want to fix this bug, you should > be able to find the appropriate part of the patch to apply but if not, > get back to me and I'll post further details.
If you are referring to Nicolas mail from 2005-09-06, http://mail.directfb.org/pipermail/directfb-users/2005-September/000551.html reenabling does not do the trick. My via_fbobj.c now has the the following diff compared to patcher2k.viafb_03.diff: bodega2 cle266 # diff -U 3 via_fbobj.c.orig via_fbobj.c --- via_fbobj.c.orig 2005-09-23 05:01:23.000000000 +0200 +++ via_fbobj.c 2005-09-29 19:57:40.000000000 +0200 @@ -1019,6 +1019,8 @@ /* Turn on all Composite and S-Video output */ I2C_wdata(I2CPort, I2CAddrTV, 0x0E, 0); + /* Reset interrupt count (and hopefully get correct field parity) */ + par->irq_cnt = 0; } void VIAPostSetTV3Mode(struct fb_info *info,int xres,int yres,int bpp) @@ -1235,6 +1237,10 @@ data = t_inb(0x3cc) | 0x0C; t_outb(data, 0x3c2); } + + // must now re-enable vsync interrupt + outb(0x11, 0x3d4); + outb(inb(0x3d5) | 0x30, 0x3d5); } static int viafb_sync(struct fb_info *info) The original patch has three parts: - fix comiler warnings - re-enable interrupts - new ioctl args -- Stefan Lucke _______________________________________________ directfb-users mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
