My environment is an EFM32GG MCU with both the framebuffer and the display attached over a parallel interface (EBI bus). This combination gives me high frame rates for trivial screen content and with the example's default configuration of NUM_BUFFERS = 1 and NUM_VSCREENS = 3 in LCDconf.c. However, there is strong flickering and tearing.
To reduce flickering and tearing, I customized LCDconf.c to NUM_BUFFERS = 2 or 3 and NUM_VSCREENS = 1. In addition, I call GUI_MULTIBUF_Begin()/_End(). The result: Flickering and tearing only goes away when using triple buffers. In addition, there is a massive drop in the screen update rate. Particularly expensive is calling GUI_MULTIBUF_Begin() with NUM_BUFFERS = 3.
This is unexpected. Can you tell me why GUI_MULTIBUF_Begin() is so expensive to call for the NUM_BUFFERS != 1 case, or how I could eliminate flickering and tearing without loosing so much frame rate?
Thanks,
Kuno
PS.: I just plan to use the rendering layer of emWin, but not the window manager.
Display All
To reduce flickering and tearing, I customized LCDconf.c to NUM_BUFFERS = 2 or 3 and NUM_VSCREENS = 1. In addition, I call GUI_MULTIBUF_Begin()/_End(). The result: Flickering and tearing only goes away when using triple buffers. In addition, there is a massive drop in the screen update rate. Particularly expensive is calling GUI_MULTIBUF_Begin() with NUM_BUFFERS = 3.
This is unexpected. Can you tell me why GUI_MULTIBUF_Begin() is so expensive to call for the NUM_BUFFERS != 1 case, or how I could eliminate flickering and tearing without loosing so much frame rate?
Thanks,
Kuno
PS.: I just plan to use the rendering layer of emWin, but not the window manager.
Source Code
- NUM_BUFFERS == 1:
- 245 fps
- 245 fps
- 244 fps
- 245 fps
- .. [GUI_MULTIBUF_Begin()] 0 ms/call, 2451 calls
- .. [TFT_DemoApp(NULL, TestModes256Emwin, TestModes256Emwin_count)] 4 ms/call, 2451 calls
- .. [GUI_MULTIBUF_End()] 0 ms/call, 2451 calls
- NUM_BUFFERS == 2:
- 34 fps
- 35 fps
- 35 fps
- 35 fps
- .. [GUI_MULTIBUF_Begin()] 24 ms/call, 352 calls
- .. [TFT_DemoApp(NULL, TestModes256Emwin, TestModes256Emwin_count)] 4 ms/call, 353 calls
- .. [GUI_MULTIBUF_End()] 0 ms/call, 353 calls
- NUM_BUFFERS == 3:
- 9 fps
- 9 fps
- 9 fps
- 9 fps
- .. [GUI_MULTIBUF_Begin()] 96 ms/call, 100 calls
- .. [TFT_DemoApp(NULL, TestModes256Emwin, TestModes256Emwin_count)] 4 ms/call, 100 calls
- .. [GUI_MULTIBUF_End()] 0 ms/call, 100 calls
The post was edited 1 time, last by kmeyer ().