From 3f0b1b8c9d9fc41b29ef5fd36cb8283b75c48198 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 14 Nov 2025 12:20:00 -0800 Subject: [PATCH] Fix mipidsi cache flush The old way didn't flush all caches and left artifacts. Fixes #10708 --- ports/espressif/common-hal/mipidsi/Display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/espressif/common-hal/mipidsi/Display.c b/ports/espressif/common-hal/mipidsi/Display.c index dac16162e91ff..cc45db72375a2 100644 --- a/ports/espressif/common-hal/mipidsi/Display.c +++ b/ports/espressif/common-hal/mipidsi/Display.c @@ -213,8 +213,9 @@ bool common_hal_mipidsi_display_deinited(mipidsi_display_obj_t *self) { } void common_hal_mipidsi_display_refresh(mipidsi_display_obj_t *self) { - // Write back the cache to ensure framebuffer changes are visible - Cache_WriteBack_Addr((uint32_t)(self->framebuffer), self->framebuffer_size); + // Drawing the framebuffer we got from the IDF will flush the cache(s) so + // DMA can see our changes. It won't cause an extra copy. + esp_lcd_panel_draw_bitmap(self->dpi_panel_handle, 0, 0, self->width, self->height, self->framebuffer); // The DPI panel will automatically refresh from the framebuffer // No explicit refresh call is needed as the DSI hardware continuously