fix(esp_lcd): yield from SPI ISR when color trans done callback wakes a task

The return value of on_color_trans_done ("whether a high priority task
has been waken up by this function", see esp_lcd_types.h) was discarded
by the SPI backend. A task unblocked from inside the callback (e.g. via
xSemaphoreGiveFromISR) therefore did not get scheduled until the next
FreeRTOS tick, adding up to 10 ms of latency per color transfer with the
default CONFIG_FREERTOS_HZ=100. The i80 backend already honors the
contract (need_yield -> portYIELD_FROM_ISR); do the same here.
This commit is contained in:
YoungsunLi
2026-09-01 19:33:03 +08:00
parent 2067f3ae32
commit 1a2b8e58f3
@@ -441,7 +441,9 @@ static void lcd_spi_post_trans_color_cb(spi_transaction_t *trans)
if (lcd_trans->flags.en_trans_done_cb) {
if (spi_panel_io->on_color_trans_done) {
spi_panel_io->on_color_trans_done(&spi_panel_io->base, NULL, spi_panel_io->user_ctx);
if (spi_panel_io->on_color_trans_done(&spi_panel_io->base, NULL, spi_panel_io->user_ctx)) {
portYIELD_FROM_ISR();
}
}
}
}