FrameBuffer

  • On PicoMOD7 there was the possiblity to enable two framebuffers. So I can draw on one buffer then change the buffers and draw on the other buffer and so on (double buffering to avoid flicker). I tried to change the virtual resolution in kernel configuration to the double height but that ends in error allocating memory for framebuffer.


    Resolution: 1024x768x32bit
    virt. Resolution: 1024x768x32bit is working but with only one buffer
    virt. Resolution: 1024x1536x32bit is not working (s3c-fb s5pv210-fb: failed to allocate display memory)


    Is there another way to enable double buffering?


    Thanks for help.

  • Please see here:


    <!-- l --><a class="postlink-local" href="http://www.forum.fs-net.de/viewtopic.php?f=55&t=3222">viewtopic.php?f=55&t=3222</a><!-- l -->

    F&amp;S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • I changed the MAX_ZONE_ORDER to value 12. Now I can allocate the 6MB Display memory and it's working with that "ungood feeling".


    The solution with predefined memory blocks for display operations in U-Boot would be great in one of the next updates.


    Thanks very much.

  • I still have some problems using double buffering. Indeed the kernel allocates 6MB of memory (1024x1536x32 bit) but the framebuffer information is still showing a resolution of 1024x768 and also virtual resolution of 1024x768.


    Code
    1. struct fb_var_screeninfo vinfo;
    2. ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo


    Code
    1. # cat /sys/class/graphics/fb0/virtual_size
    2. 1024,768


    Any Idea? Thanks.

  • Well that screen resolution of 1024x768 is OK, because this *is* the resolution of the display. However the virtual information should reflect the larger size. How did you change the virtual resolution?

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Well, I had a look into the framebuffer sources. The framebuffer's buffer is allocated with the virtual size, but the framebuffer's window is always initialized at the nominal size. If you want to have a larger virtual window, you have to open the framebuffer device and call ioctl() with FBIOPUT_VSCREENINFO and the larger size.


    Or put in other words: the virtual size given in the configuration is just the maximum possible virtual size, not the real virtual size the display is initialized with. The display always starts with virtual size == physical size.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.