---
title: "LVGL Benchmark"
description: "Compiles, and the upstream benchmark is well known to be stable. Real per-SoM numbers land in the v1.0 HiL sweep."
source: https://docs.alplab.ai/sdk/examples/lvgl-benchmark
---

# `lvgl-benchmark`

:::warning[`[UNTESTED]`]
Compiles, and the upstream benchmark is well known to be stable. Real per-SoM numbers land in the v1.0 HiL sweep.
:::

Wraps the upstream **`lv_demo_benchmark()`** — LVGL's canonical performance harness. Walks a fixed scene set (gradients, alpha blends, text rendering, image rotation, …) and reports per-scene FPS.

Source: [`examples/display/lvgl-benchmark/`](https://github.com/alplabai/alp-sdk/tree/main/examples/display/lvgl-benchmark).

## Why run it

Compare the same demo across SoMs to see what the SoC's declared graphics blocks (`metadata/socs/alif/ensemble/e*.json`) are actually buying you at runtime:

- **E1M-AEN801 (E8)** declares `gpu2d`, `dave2d`, and `dma2d`. The `§D.lib.loader` emits `CONFIG_ALP_LVGL_GPU2D=y` + `CONFIG_ALP_LVGL_DMA2D=y`, and LVGL accelerates the blits.
- **E1M-AEN301 (E3)** declares `dma2d` only — no `gpu2d`. Loader emits `CONFIG_ALP_LVGL_DMA2D=y` only; blits fall back to CPU. The FPS drop is the visible measure of what GPU2D buys you.

`CONFIG_ALP_LVGL_DAVE2D=y` is *not* emitted on the E8 even though the die declares `dave2d`: the loader binds **one backend per capability class**, and `gpu2d` outranks `dave2d` in the `gpu_2d` class (see [`metadata/libraries/lvgl.yaml`](https://github.com/alplabai/alp-sdk/blob/main/metadata/libraries/lvgl.yaml)). `CONFIG_ALP_LVGL_SW_BLIT=y` stays set as the always-available fallback.

:::note[This is LVGL's own acceleration path]
These `CONFIG_ALP_LVGL_*` bindings are LVGL's internal draw-unit hookup, which is a different thing from the portable [`<alp/gpu2d.h>`](https://docs.alplab.ai/sdk/api/gpu2d) surface — that one's Alif backend needs a proprietary pack and is bench-unverified. Don't read this benchmark as evidence that `<alp/gpu2d.h>` is accelerated.
:::

This is the `requires_cap` capability-keyed binding system in action — same source, different `CONFIG_*` flags per SKU automatically.

## Display bring-up

Like the other Zephyr LVGL examples, the app opens the panel via [`alp_display_open()`](https://docs.alplab.ai/sdk/api/display) and binds LVGL with [`alp_gui_lvgl_attach()`](https://docs.alplab.ai/sdk/api/gui) before calling `lv_demo_benchmark()`, with `CONFIG_LV_Z_AUTO_INIT=n` set in `prj.conf`. See [`lvgl-widgets-demo`](https://docs.alplab.ai/sdk/examples/lvgl-widgets-demo) for the full init sequence and Kconfig table.

`CONFIG_LV_DEF_REFR_PERIOD=16` targets a 60 fps refresh. On `native_sim` the run binds Zephyr's dummy display driver (`CONFIG_DUMMY_DISPLAY=y`, `CONFIG_SDL_DISPLAY=n`) — there is no SDL2 window.

## `board.yaml`

```yaml
libraries:
  - name: lvgl
    cores: [m55_hp]

som:
  sku: E1M-AEN801           # E8 has GPU2D + DAVE2D + DMA2D populated.

preset: e1m-evk

pins:
  - { e1m: E1M_SPI1, macro: EVK_SPI_BUS_ARDUINO, doc: "Arduino UNO header SPI" }

cores:
  a32_cluster:
    os: "off"
  m55_hp:
    app: ./src
    peripherals:
      - spi
      - gpio

chips:
  - st7789

diagnostics:
  log_level: info
```

## See also

- [`<alp/display.h>`](https://docs.alplab.ai/sdk/api/display) · [`<alp/gui.h>`](https://docs.alplab.ai/sdk/api/gui)
- [`lvgl-widgets-demo`](https://docs.alplab.ai/sdk/examples/lvgl-widgets-demo) · [`lvgl-music-player`](https://docs.alplab.ai/sdk/examples/lvgl-music-player)
- [Architecture: capability validation](https://docs.alplab.ai/sdk/architecture#capability-validation)
- [Examples overview](https://docs.alplab.ai/sdk/examples/overview)
