From f147c9a34c19d8bbf3a89131fdcdf07ff05a4779 Mon Sep 17 00:00:00 2001 From: Akos Vandra-Meyer Date: Wed, 29 Jul 2026 17:23:25 +0200 Subject: [PATCH] feat(draw/ppa): support SoCs that expose no L2 cache line size (#10396) --- env_support/cmake/esp.cmake | 2 +- src/draw/espressif/ppa/lv_draw_ppa_private.h | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/env_support/cmake/esp.cmake b/env_support/cmake/esp.cmake index 591a9b07e0..7ce11df4ff 100644 --- a/env_support/cmake/esp.cmake +++ b/env_support/cmake/esp.cmake @@ -55,7 +55,7 @@ else() set(IDF_COMPONENTS esp_timer log) - if(${target} STREQUAL "esp32p4") + if(${target} STREQUAL "esp32p4" OR ${target} STREQUAL "esp32s31") list(APPEND IDF_COMPONENTS esp_driver_ppa esp_mm) endif() diff --git a/src/draw/espressif/ppa/lv_draw_ppa_private.h b/src/draw/espressif/ppa/lv_draw_ppa_private.h index e87b966104..a1323f2d37 100644 --- a/src/draw/espressif/ppa/lv_draw_ppa_private.h +++ b/src/draw/espressif/ppa/lv_draw_ppa_private.h @@ -31,8 +31,16 @@ extern "C" { /* The ppa driver depends heavily on the esp-idf headers*/ #include -#if (CONFIG_LV_DRAW_BUF_ALIGN != CONFIG_CACHE_L2_CACHE_LINE_SIZE) -#error "CONFIG_LV_DRAW_BUF_ALIGN must be equal to CONFIG_CACHE_L2_CACHE_LINE_SIZE!" +#if defined(CONFIG_CACHE_L2_CACHE_LINE_SIZE) +#define LV_DRAW_PPA_CACHE_LINE_SIZE CONFIG_CACHE_L2_CACHE_LINE_SIZE +#elif defined(CONFIG_CACHE_L1_DCACHE_LINE_SIZE) +#define LV_DRAW_PPA_CACHE_LINE_SIZE CONFIG_CACHE_L1_DCACHE_LINE_SIZE +#else +#error "Cannot determine the data cache line size for the PPA draw unit" +#endif + +#if (CONFIG_LV_DRAW_BUF_ALIGN != LV_DRAW_PPA_CACHE_LINE_SIZE) +#error "CONFIG_LV_DRAW_BUF_ALIGN must be equal to the data cache line size!" #endif