Skip to content

arch(config): introduce LV_COLOR_FORMAT_DEFAULT and deprecate LV_COLOR_DEPTH - #10547

Merged
AndreCostaaa merged 2 commits into
lvgl:masterfrom
AndreCostaaa:deprecate-lv-color-depth
Sep 1, 2026
Merged

arch(config): introduce LV_COLOR_FORMAT_DEFAULT and deprecate LV_COLOR_DEPTH#10547
AndreCostaaa merged 2 commits into
lvgl:masterfrom
AndreCostaaa:deprecate-lv-color-depth

Conversation

@AndreCostaaa

Copy link
Copy Markdown
Collaborator

No description provided.

@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.

2 issues found and verified against the latest diff

You’re at about 95% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="Kconfig">

<violation number="1" location="Kconfig:265">
P1: When any Kconfig format other than RGB565 is selected, Kconfig emits the member symbol but no `CONFIG_LV_COLOR_FORMAT_DEFAULT`, so `lv_conf_internal.h` silently falls back to RGB565. Add a Kconfig-to-header bridge or derive the macro from the selected `LV_COLOR_FORMAT_*` member before relying on this named choice.</violation>
</file>

<file name="scripts/generators/config_headers/kconfig_utils.py">

<violation number="1" location="scripts/generators/config_headers/kconfig_utils.py:205">
P1: When this helper processes the bundled kconfiglib symbols, `sym.defaults` entries contain a source-location field, so the two-value unpack raises before `LV_COLOR_DEPTH` can be classified. Unpack the optional location field as well.</violation>
</file>

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

Re-trigger cubic

Comment thread Kconfig
prompt "Color depth"
default LV_COLOR_DEPTH_16

choice LV_COLOR_FORMAT_DEFAULT

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.

P1: When any Kconfig format other than RGB565 is selected, Kconfig emits the member symbol but no CONFIG_LV_COLOR_FORMAT_DEFAULT, so lv_conf_internal.h silently falls back to RGB565. Add a Kconfig-to-header bridge or derive the macro from the selected LV_COLOR_FORMAT_* member before relying on this named choice.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Kconfig, line 265:

<comment>When any Kconfig format other than RGB565 is selected, Kconfig emits the member symbol but no `CONFIG_LV_COLOR_FORMAT_DEFAULT`, so `lv_conf_internal.h` silently falls back to RGB565. Add a Kconfig-to-header bridge or derive the macro from the selected `LV_COLOR_FORMAT_*` member before relying on this named choice.</comment>

<file context>
@@ -261,10 +261,46 @@ endmenu
-		prompt "Color depth"
-		default LV_COLOR_DEPTH_16
 
+	choice LV_COLOR_FORMAT_DEFAULT
+		prompt "Default color format"
+		default LV_COLOR_FORMAT_I1       if LV_COLOR_DEPTH_1
</file context>

Comment thread scripts/generators/config_headers/templates.py Outdated
table: dict[str, str] = {}
fallback = None

for value, cond in sym.defaults:

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.

P1: When this helper processes the bundled kconfiglib symbols, sym.defaults entries contain a source-location field, so the two-value unpack raises before LV_COLOR_DEPTH can be classified. Unpack the optional location field as well.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/generators/config_headers/kconfig_utils.py, line 205:

<comment>When this helper processes the bundled kconfiglib symbols, `sym.defaults` entries contain a source-location field, so the two-value unpack raises before `LV_COLOR_DEPTH` can be classified. Unpack the optional location field as well.</comment>

<file context>
@@ -165,6 +166,102 @@ def int_const_value(sym) -> str:
+    table: dict[str, str] = {}
+    fallback = None
+
+    for value, cond in sym.defaults:
+        literal = _literal_value(value)
+        if literal is None:
</file context>
Suggested change
for value, cond in sym.defaults:
for value, cond, *_ in sym.defaults:

Comment thread include/lvgl/config/lv_conf_internal.h
Comment thread docs/src/integration/embedded_linux/drivers/glfw.mdx Outdated
Comment thread scripts/generators/config_headers/config_entry.py Outdated
@AndreCostaaa
AndreCostaaa force-pushed the deprecate-lv-color-depth branch from 044d746 to 75b0edc Compare August 28, 2026 11:46
@github-actions

github-actions Bot commented Aug 28, 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 (-2) 24 (+5) 24 (+5) 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 (-36) 70 (+51) 70 (+51) 0
Single rectangle 101 49 0 0 0
Multiple rectangles 101 49 4 (+1) 4 (+1) 0
Multiple RGB images 101 46 (-2) 16 (+12) 16 (+12) 0
Multiple ARGB images 101 49 13 (+1) 13 (+1) 0
Rotated ARGB images 101 25 37 (-1) 37 (-1) 0
Multiple labels 101 60 (+1) 13 13 0
Screen sized text 101 24 39 39 0
Multiple arcs 101 41 (-1) 21 21 0
Containers 101 48 (-1) 5 5 0
Containers with overlay 101 14 68 (+1) 68 (+1) 0
Containers with opa 101 48 (-1) 12 (-1) 12 (-1) 0
Containers with opa_layer 101 43 20 (+2) 20 (+2) 0
Containers with scrolling 101 31 30 30 0
Widgets demo 101 30 30 30 0
All scenes avg. 101 38 (-2) 24 (+5) 24 (+5) 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 39 (-3) 21 (+3) 21 (+3) 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 (-33) 56 (+37) 56 (+37) 0
Single rectangle 101 49 0 0 0
Multiple rectangles 101 49 3 3 0
Multiple RGB images 101 49 14 (+10) 14 (+10) 0
Multiple ARGB images 101 49 13 (+1) 13 (+1) 0
Rotated ARGB images 101 43 (-2) 21 (+1) 21 (+1) 0
Multiple labels 101 50 (-1) 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 15 (+1) 62 (-2) 62 (-2) 0
Containers with opa 101 49 (-1) 12 12 0
Containers with opa_layer 101 45 (-2) 16 (+2) 16 (+2) 0
Containers with scrolling 101 32 29 29 0
Widgets demo 101 31 29 29 0
All scenes avg. 101 39 (-3) 21 (+3) 21 (+3) 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.

@AndreCostaaa
AndreCostaaa force-pushed the deprecate-lv-color-depth branch 3 times, most recently from 03270ac to 88adcc5 Compare August 31, 2026 05:47
Comment thread examples/assets/img_cogwheel_rgb.c Outdated
Comment thread src/drivers/draw/eve/lv_draw_eve_display.c
@AndreCostaaa
AndreCostaaa force-pushed the deprecate-lv-color-depth branch 3 times, most recently from 3c2a510 to 5b4d5b3 Compare August 31, 2026 15:24
Comment thread tests/src/test_assets/test_img_emoji_F617.c Outdated
@AndreCostaaa
AndreCostaaa force-pushed the deprecate-lv-color-depth branch 4 times, most recently from 5db806c to 682f438 Compare September 1, 2026 10:01
@kisvegabor kisvegabor added this to the v9.6.0 milestone Sep 1, 2026
kisvegabor
kisvegabor previously approved these changes Sep 1, 2026
@AndreCostaaa
AndreCostaaa force-pushed the deprecate-lv-color-depth branch from 682f438 to 3b72f8a Compare September 1, 2026 15:06
@AndreCostaaa
AndreCostaaa merged commit f90e371 into lvgl:master Sep 1, 2026
49 of 51 checks passed
@AndreCostaaa
AndreCostaaa deleted the deprecate-lv-color-depth branch September 1, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants