[maemo-developers] SDL, tearing, X overhead and direct framebuffer gfx
From: Frantisek Dufka dufkaf at seznam.czDate: Mon Feb 18 11:31:24 EET 2008
- Previous message: SDL, tearing, X overhead and direct framebuffer gfx
- Next message: SDL, tearing, X overhead and direct framebuffer gfx
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Tapani Pälli wrote:
> Hello;
>
> ext Tobias Oberstein wrote:
>> Hello tableteers,
>>
>> I've done some initial experiments hacking my N800/OS2008 and ran into a
>> couple of issues:
>>
>> When using the supplied SDL library for doing timer-based frame
>> rendering, there seems to be
>>
>> - heavy tearing
>>
>
> Tearing unfortunately happens because there is no vsync available for
> framebuffer driver to use.
>
with direct fb access there is ioctl flag OMAPFB_FORMAT_FLAG_TEARSYNC
that should take care of it and schedule the update at right time. But
still I think there is not enough time to do full screen 800x480x16bit
update even if it starts at right time.
In the example Tobias posted it is this part
// wait for fb->lcd video ram transfer complete
ioctl (fbfd, OMAPFB_SYNC_GFX);
// "render" whole frame in single color
memset (fbp, n, ssize);
// wait for vsync
ioctl (fbfd, OMAPFB_VSYNC);
// request transfer of fb-> lcd video ram for whole screen
ioctl (fbfd, OMAPFB_UPDATE_WINDOW, &update);
and basically it looks correct to me except maybe 'ioctl (fbfd,
OMAPFB_VSYNC);' may do nothing but won't hurt.
>> Q: Is this expected behaviour? What could I do about the tearing? What
>> about the Xomap overhead?
This was discussed here in the list and there are timing results posted
by Siarhei Siamashka. I think you can only solve it by updating smaller
region and/or use 12 bit YUV format.
There was also discussion about 'accelerated' SDL with direct fb access.
I think it would be a nice hack to use direct fb access when SDL X
window is on the top or full screen and fall back to using X in other
cases. But due to hackish nature and HW dependency on features of Epson
chips in 770 and N8x0 it won't be accepted to nokia version of SDL. I
think the hint was that that future generation of devices will not use
similar chip so there is no future for this code. But true that there
are present and past devices so it may make sense to make hacked
community version of SDL for current game ports. Also such version could
safely take advantage of pixel doubling which is impossible to use
safely with Xsp extension.
Frantisek
- Previous message: SDL, tearing, X overhead and direct framebuffer gfx
- Next message: SDL, tearing, X overhead and direct framebuffer gfx
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
