There could be mis-use of the framebuffer's FBIOPUT_VSCREENINFO as a
way to update the screen instead of using FBIOPAN_DISPLAY. The former
ioctl could take significant amount of time re-calculating the timing
assuming resolution/color depth changes, and re-initializing the controller
for a new mode, and that could result in screen blinking. Please check
your Android code against this theory.
That's exactly what Android does in a couple of places, e.g.
system/core/init/logo.c, function fb_update() [that one actually calls
FBIOPUT_VSCREENINFO _twice_ to update the screen]
hardware/libhardware/modules/gralloc/framebuffer.cpp, function fb_post
This should be fairly easy to fix, but googling it, I found an
explanation from an upstream engineer on why they're doing it that way
-- apparently on some graphics drivers, FBIOPAN_DISPLAY does smooth
panning, which obviously isn't what you want for a simple screen
refresh.
I'm definitely going to change it to see whether or not this is the
problem (and also to probably get a bit of a performance boost on
Panda) - but I wonder what hardware we're going to break with that.
Given other pieces of code (e.g. SDL) use FBIOPAN_DISPLAY for screen
refreshes, I think using that ioctl should be mostly safe.
> The former
> ioctl could take significant amount of time re-calculating the timing
> assuming resolution/color depth changes, and re-initializing the controller
> for a new mode, and that could result in screen blinking.
That is consistent with the messages I'm seeing in dmesg output.
Maybe (in addition to fixing userland) the driver should be a bit
smarter and not reinitialize the controller if it realizes the old and
new modes are actually the same, given Android is probably not the
only piece of code that uses FBIOPUT_VSCREENINFO, given apparently
some fb drivers interpret FBIOPAN_DISPLAY as something different...
On 27 August 2011 21:45, Bernhard Rosenkranzer
<bernhard.rosenkranzer at linaro.org> wrote:
> That's exactly what Android does in a couple of places, e.g.
> system/core/init/logo.c, function fb_update() [that one actually calls
> FBIOPUT_VSCREENINFO _twice_ to update the screen]
> hardware/libhardware/modules/gralloc/framebuffer.cpp, function fb_post
I just changed it, and it works! We now have a really working display
on iMX53 Android. Thanks to everyone who helped!
Here's the relevant thread on linaro-dev mailing list:
1. http:// lists.linaro. org/pipermail/ linaro- dev/2011- August/ 006962. html
There could be mis-use of the framebuffer's FBIOPUT_VSCREENINFO as a
way to update the screen instead of using FBIOPAN_DISPLAY. The former
ioctl could take significant amount of time re-calculating the timing
assuming resolution/color depth changes, and re-initializing the controller
for a new mode, and that could result in screen blinking. Please check
your Android code against this theory.
2. http:// lists.linaro. org/pipermail/ linaro- dev/2011- August/ 006965. html
> There could be mis-use of the framebuffer's FBIOPUT_VSCREENINFO as a
> way to update the screen instead of using FBIOPAN_DISPLAY.
That's exactly what Android does in a couple of places, e.g. core/init/ logo.c, function fb_update() [that one actually calls libhardware/ modules/ gralloc/ framebuffer. cpp, function fb_post
system/
FBIOPUT_VSCREENINFO _twice_ to update the screen]
hardware/
This should be fairly easy to fix, but googling it, I found an
explanation from an upstream engineer on why they're doing it that way
-- apparently on some graphics drivers, FBIOPAN_DISPLAY does smooth
panning, which obviously isn't what you want for a simple screen
refresh.
I'm definitely going to change it to see whether or not this is the
problem (and also to probably get a bit of a performance boost on
Panda) - but I wonder what hardware we're going to break with that.
Given other pieces of code (e.g. SDL) use FBIOPAN_DISPLAY for screen
refreshes, I think using that ioctl should be mostly safe.
> The former
> ioctl could take significant amount of time re-calculating the timing
> assuming resolution/color depth changes, and re-initializing the controller
> for a new mode, and that could result in screen blinking.
That is consistent with the messages I'm seeing in dmesg output. VSCREENINFO, given apparently
Maybe (in addition to fixing userland) the driver should be a bit
smarter and not reinitialize the controller if it realizes the old and
new modes are actually the same, given Android is probably not the
only piece of code that uses FBIOPUT_
some fb drivers interpret FBIOPAN_DISPLAY as something different...
3. http:// lists.linaro. org/pipermail/ linaro- dev/2011- August/ 006971. html
On 27 August 2011 21:45, Bernhard Rosenkranzer rosenkranzer at linaro.org> wrote: core/init/ logo.c, function fb_update() [that one actually calls libhardware/ modules/ gralloc/ framebuffer. cpp, function fb_post
<bernhard.
> That's exactly what Android does in a couple of places, e.g.
> system/
> FBIOPUT_VSCREENINFO _twice_ to update the screen]
> hardware/
I just changed it, and it works! We now have a really working display
on iMX53 Android. Thanks to everyone who helped!