Skip to content

fix(refr): fixes for triple buffering (v2) - #10445

Open
kpajko79 wants to merge 5 commits into
lvgl:masterfrom
kpajko79:feature/fix-triple-buffering-v2
Open

kpajko79 wants to merge 5 commits into
lvgl:masterfrom
kpajko79:feature/fix-triple-buffering-v2

Conversation

@kpajko79

@kpajko79 kpajko79 commented Aug 8, 2026 •

Copy link
Copy Markdown

This is a refactor of #10409 . See that for the description of the triple buffering-related fix.

After realizing the purpose of sync_cb() instead of hijacking I have renamed and documented it to prevent accidental use.

Review in cubic

@github-actions

github-actions Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Hi 👋, thank you for your PR!

We've run benchmarks in an emulated environment. Here are the results:

ARM Emulated 32b - lv_conf_perf32b

Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
All scenes avg. 101 38 24 24 0
Detailed Results Per Scene
Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
Empty screen 101 44 7 7 0
Moving wallpaper 101 14 70 70 0
Single rectangle 101 49 0 0 0
Multiple rectangles 101 49 3 (-1) 3 (-1) 0
Multiple RGB images 101 47 16 16 0
Multiple ARGB images 101 48 (-1) 13 13 0
Rotated ARGB images 101 25 38 38 0
Multiple labels 101 60 13 13 0
Screen sized text 101 24 39 39 0
Multiple arcs 101 42 20 20 0
Containers 101 49 5 5 0
Containers with overlay 101 14 68 68 0
Containers with opa 101 48 13 13 0
Containers with opa_layer 101 43 (-2) 19 (+1) 19 (+1) 0
Containers with scrolling 101 31 30 30 0
Widgets demo 101 30 30 30 0
All scenes avg. 101 38 24 24 0

ARM Emulated 64b - lv_conf_perf64b

Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
All scenes avg. 101 40 21 21 0
Detailed Results Per Scene
Scene Name Avg CPU (%) Avg FPS Avg Time (ms) Render Time (ms) Flush Time (ms)
Empty screen 101 44 7 7 0
Moving wallpaper 101 17 56 56 0
Single rectangle 101 49 0 0 0
Multiple rectangles 101 49 3 3 0
Multiple RGB images 101 49 13 (-1) 13 (-1) 0
Multiple ARGB images 101 49 13 (+1) 13 (+1) 0
Rotated ARGB images 101 44 (+1) 20 20 0
Multiple labels 101 51 13 13 0
Screen sized text 101 24 39 39 0
Multiple arcs 101 44 19 19 0
Containers 101 49 4 4 0
Containers with overlay 101 14 66 66 0
Containers with opa 101 50 12 (+1) 12 (+1) 0
Containers with opa_layer 101 45 (-1) 17 17 0
Containers with scrolling 101 33 29 29 0
Widgets demo 101 31 29 29 0
All scenes avg. 101 40 21 21 0

Disclaimer: These benchmarks were run in an emulated environment using QEMU with instruction counting mode.
The timing values represent relative performance metrics within this specific virtualized setup and should
not be interpreted as absolute real-world performance measurements. Values are deterministic and useful for
comparing different LVGL features and configurations, but may not correlate directly with performance on
physical hardware. The measurements are intended for comparative analysis only.


🤖 This comment was automatically generated by a bot.

@kpajko79

kpajko79 commented Aug 8, 2026

Copy link
Copy Markdown
Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@kpajko79 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 12 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/core/lv_refr.c
Comment thread include/lvgl/display/lv_display.h Outdated
Comment thread src/display/lv_display_private.h Outdated
@kpajko79
kpajko79 marked this pull request as ready for review August 8, 2026 08:09

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 12 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread include/lvgl/display/lv_display.h Outdated
@kpajko79

kpajko79 commented Aug 8, 2026 •

Copy link
Copy Markdown
Author

I have ran the tests locally under WSL2. The same two tests fail as on master. Something broke I1, I2 and I4 rendering before in test_image_clip_radius and bin_image_stride1_UNCOMPRESSED_simple in test_image_formats.
The differences between the rendered and reference images: https://postimg.cc/gallery/rzTqvhv

@kpajko79
kpajko79 marked this pull request as draft August 9, 2026 04:45
@kpajko79

kpajko79 commented Aug 9, 2026

Copy link
Copy Markdown
Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@kpajko79 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 17 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread docs/src/main-modules/display/rotation.mdx
Comment thread src/core/lv_refr.c
Comment thread docs/src/main-modules/display/rotation.mdx Outdated
@kpajko79

kpajko79 commented Aug 9, 2026

Copy link
Copy Markdown
Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@kpajko79 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 17 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread docs/src/main-modules/display/rotation.mdx Outdated
Comment thread docs/src/main-modules/display/rotation.mdx Outdated
@kpajko79

kpajko79 commented Aug 9, 2026

Copy link
Copy Markdown
Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@kpajko79 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 17 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread docs/src/main-modules/display/rotation.mdx
@kpajko79

kpajko79 commented Aug 9, 2026

Copy link
Copy Markdown
Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@kpajko79 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 17 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/core/lv_refr.c
@kpajko79
kpajko79 marked this pull request as ready for review August 9, 2026 16:12

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 17 files

Re-trigger cubic

@AndreCostaaa

Copy link
Copy Markdown
Collaborator

Hi let's get #10448 merged first so that we can ensure this doesn't introduce any regressions

@kpajko79

Copy link
Copy Markdown
Author

Hi @AndreCostaaa,

Fine, but I think this pull request should wait for #9139 to be merged too, if it is accepted.

@AndreCostaaa

Copy link
Copy Markdown
Collaborator

#10448 is merged, feel free to rebase

@kpajko79
kpajko79 marked this pull request as draft September 1, 2026 17:25
@kpajko79
kpajko79 force-pushed the feature/fix-triple-buffering-v2 branch from d20e2d9 to acd8d9d Compare September 1, 2026 17:50
@kpajko79

kpajko79 commented Sep 1, 2026

Copy link
Copy Markdown
Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@cubic review

@kpajko79 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 17 files

Re-trigger cubic

@kpajko79
kpajko79 force-pushed the feature/fix-triple-buffering-v2 branch from acd8d9d to 3de28d1 Compare September 1, 2026 18:10
@kpajko79

kpajko79 commented Sep 1, 2026 •

Copy link
Copy Markdown
Author

Hi @AndreCostaaa,

I have completed the rebase and there is one thing left. Somebody created a unit test for the previous undocumented state and it is completely wrong! sync_cb has nothing to do with DIRECT mode rendering, it is strictly for PARTIAL. Sorry but I'm not going to fix that.

Another garbage from the code:

" /*Two more frames, each of them refreshing an unrelated area. The rectangle
has to be propagated to all of the three buffers./
"

No this is not true at all!

@kpajko79

kpajko79 commented Sep 1, 2026

Copy link
Copy Markdown
Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@cubic review

@kpajko79 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 19 files

Re-trigger cubic

@kpajko79
kpajko79 marked this pull request as ready for review September 1, 2026 18:54

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 19 files

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants