Double buffer support in Framebuffer?
Hello, Could I ask how do I enable double buffer support in FrameBuffer device? I think I could manually increase xres_virtual/yres_virtual to 2 times of the display size in video driver and swap xoffset/yoffset after VSync. But could I know if this is the right way to do double buffering or this function is already built-in? Thank you! Philip Chen
Hi Philip, Replying to all this time. On Wed, Apr 27, 2011 at 4:24 PM, siqiao chen <siqiaochen@gmail.com> wrote:
Hello, Could I ask how do I enable double buffer support in FrameBuffer device? I think I could manually increase xres_virtual/yres_virtual to 2 times of the display size in video driver and swap xoffset/yoffset after VSync. But could I know if this is the right way to do double buffering or this function is already built-in?
You're on the right track. You only need to double xres_virtual or yres_virtual, not both. Let's suppose that your display is 800x480. Then your display driver needs to size the framebuffer to be 800x960, and you'd use FBIOPAN_DISPLAY to toggle between 0,0 and 0,480. The driver has to support the double sized framebuffer and the pan command (or maybe you can modify yoffset directly? I haven't tried this approach myself). -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com
O, I get it! Thank you for your explanation! On Wed, Apr 27, 2011 at 8:22 PM, Dave Hylands <dhylands@gmail.com> wrote:
Hi Philip,
Replying to all this time.
On Wed, Apr 27, 2011 at 4:24 PM, siqiao chen <siqiaochen@gmail.com> wrote:
Hello, Could I ask how do I enable double buffer support in FrameBuffer device? I think I could manually increase xres_virtual/yres_virtual to 2 times of the display size in video driver and swap xoffset/yoffset after VSync. But could I know if this is the right way to do double buffering or this function is already built-in?
You're on the right track. You only need to double xres_virtual or yres_virtual, not both.
Let's suppose that your display is 800x480. Then your display driver needs to size the framebuffer to be 800x960, and you'd use FBIOPAN_DISPLAY to toggle between 0,0 and 0,480.
The driver has to support the double sized framebuffer and the pan command (or maybe you can modify yoffset directly? I haven't tried this approach myself).
-- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com
participants (2)
-
Dave Hylands -
siqiao chen