On 29 August 2011 07:11, Christian Robottom Reis kiko@linaro.org wrote:
I don't think we should keep the bug open pending feedback from upstream, but we definitely should start a thread to figure out why upstream has chosen to use FBIOPUT_VSCREENINFO.
We know that -- they chose it because some driver they were working with thought that FBIOPAN_DISPLAY should do smooth panning, which obviously isn't what you want to do to flip between 2 buffers. IMO that driver should be fixed if we ever run into it (especially given other stuff, like SDL, also uses FBIOPAN_DISPLAY).
If we run into it and we can't fix the driver, I propose something along the lines of
static int REFRESH_DISPLAY = FBIOPAN_DISPLAY; [...] ioctl(fd, FBIOGET_FSCREENINFO, &fi); if(!strcmp(fi.id, "BrokenDriver")) REFRESH_DISPLAY = FBIOPUT_VSCREENINFO; [...] ioctl(fd, REFRESH_DISPLAY, &whatever);
Given FBIOPAN_DISPLAY and FBIOPUT_VSCREENIFNO take the same parameters, we can do that almost without penalty.
ttyl bero