Skip to content

fix: stream ESP32-S3 LCD clockless chunks - #2703

Merged
zackees merged 2 commits into
masterfrom
fix/2690-2693-autoresearch-lcd
Jun 3, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/2690-2693-autoresearch-lcd

Conversation

@zackees

@zackees zackees commented Jun 3, 2026 •

Copy link
Copy Markdown
Member

Summary

  • enables AutoResearch selection for ESP32-S3/C6/P4 and Teensy by filtering on board: instead of platform:
  • keeps AutoResearch board builds on the fbuild-only path and avoids PlatformIO package installation during fbuild builds
  • streams LCD_CLOCKLESS chunks from a worker task while keeping the ESP LCD SPI queue filled, with padded fixed-size chunk transactions
  • adds regression coverage for AutoResearch filters, staged fbuild project dirs, fbuild-only selection, and LCD chunk fidelity

Tests

  • uv run python -m pytest ci/tests/test_autoresearch_phases.py ci/tests/test_fbuild_default_selection.py ci/tests/test_sketch_filter.py ci/tests/test_filter_examples.py -q (130 passed)
  • bash test --cpp tests/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp
  • bash test --cpp tests/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_spi.cpp
  • git diff --check
  • fbuild compiled staged ESP32-S3 AutoResearch firmware and produced firmware.bin / firmware.elf

Hardware Validation

Blocked before serial AutoResearch results: fbuild deploy hangs while writing ESP partitions after the bootloader write succeeds. Tracked upstream as FastLED/fbuild#379.

Closes #2690
Closes #2693

Summary by CodeRabbit

  • New Features

    • Added queued/non-blocking LCD transmit support for more reliable multi-chunk DMA transfers.
  • Improvements

    • LCD driver reworked for worker-backed chunk submission and better DMA handling, improving display stability and throughput.
    • AutoResearch builds now use the fbuild path for package resolution (avoids invoking the legacy package helper).
    • Sketch selection supports a staged src/sketch fallback and example filter now selects by board.
  • Tests

    • New and updated tests cover staged projects, fbuild install behavior, filtering, and LCD chunking fidelity.

@coderabbitai

coderabbitai Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR makes FbuildDriver the default for AutoResearch builds (install_packages no longer calls PlatformIO), adds a staged build_dir/src/sketch fallback, switches the AutoResearch example filter from platform: to board:, and refactors the ESP32 LCD SPI stack to a worker-task driven multi-chunk DMA flow with queued transmits and pending-transfer tracking.

Changes

AutoResearch Build System & Filter Updates

Layer / File(s) Summary
FbuildDriver as primary driver, PlatformIO removed from install path
ci/autoresearch/build_driver.py
FbuildDriver is documented and returned for AutoResearch builds; select_build_driver ignores the deprecated _no_fbuild_flag; FbuildDriver.install_packages no longer calls PlatformIO helper and returns True.
Sketch path resolution with staged directory fallback
ci/autoresearch/phases.py
_parse_args_and_build_commands checks build_dir/src/sketch as a staged fallback when build_dir/examples/AutoResearch is absent and reports both locations on error.
AutoResearch filter update to board selector
examples/AutoResearch/AutoResearch.ino
@filter changed from platform: to board: for the listed ESP32/Teensy targets so board names (e.g., esp32s3) match correctly.
AutoResearch CI tests for fbuild and staging
ci/tests/test_autoresearch_phases.py, ci/tests/test_fbuild_default_selection.py, ci/tests/test_sketch_filter.py
Added fixture and test to validate staged src/sketch usage and PLATFORMIO_SRC_DIR, test ensuring FbuildDriver.install_packages doesn't call PlatformIO helper, and tests validating the AutoResearch sketch filter parsing and board compatibility.

LCD SPI Worker-Task Chunked DMA Architecture

Layer / File(s) Summary
Queued transmit virtual API
src/platforms/esp/32/drivers/lcd_spi/ilcd_spi_peripheral.h
Adds ILcdSpiPeripheral::queueTransmit virtual API with a default implementation forwarding to transmit.
LcdSpiPeripheralEsp queued transmit and pending-transmit tracking
src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.h, src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.cpp.hpp
Adds queueTransmit, introduces transmitInternal(..., wait_for_slot) helper, tracks mPendingTransmits, updates ISR completion bookkeeping, prevents panel-IO recreation while pending, and updates waitTransmitDone/isBusy.
ChannelDriverLcdClockless worker-task integration and chunk submission
src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.h, src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp
Implements a FreeRTOS worker task and ISR-to-worker notifications, centralizes chunk encoding/submission in submitChunk/processWorkerQueue, updates isrChunkDone to notify worker and advance counters, changes beginTransmission to seed worker-driven flow, and adjusts poll terminal conditions.
Factory wrapper queueTransmit forwarding
src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_spi.cpp.hpp
Factory EspWrapper adds an IRAM-safe queueTransmit override that forwards to LcdSpiPeripheralEsp::queueTransmit alongside existing transmit forwarding.
LCD clockless driver test updates and fidelity validation
tests/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp
Adds helper to flatten transmit history, updates expected transmit counts and DMA assertions, adds a regression test comparing flattened word streams between forced-large-chunk and default-chunk runs, and adjusts error-mid-stream assertions.

Sequence Diagram(s)

sequenceDiagram
  participant Task as Task/Poll
  participant ISR as ISR\nisrChunkDone
  participant Worker as Worker Task
  participant Peripheral as LcdSpiPeripheral

  Task->>Peripheral: submitChunk(0, true)\nqueueTransmit buffer
  Peripheral->>Peripheral: mPendingTransmits++
  Peripheral->>ISR: DMA complete interrupt
  ISR->>ISR: mCompletedChunks++
  alt more chunks remain
    ISR->>Worker: notifyWorkerFromIsr()
    Worker->>Peripheral: submitChunk(i, false)
    Peripheral->>ISR: DMA complete
    ISR->>Worker: notify for next chunk
  else all chunks done
    ISR->>ISR: mStreamComplete=true
  end
  Task->>Worker: processWorkerQueue()\nduring poll
  Worker->>Task: submit remaining chunks
  Task->>Task: poll(): stream complete +\nidle peripheral → ready
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related issues

  • #2690: fix(ci): let AutoResearch esp32s3 pass example filters without --no-filter — this PR changes the AutoResearch filter from platform: to board: and adds tests that address that issue's acceptance criteria.
  • #2693: fix(esp32-s3): LCD_CLOCKLESS multi-chunk ISR re-arm corrupts chunks after first — this PR implements a worker-task encoding/submission model and pending-transmit tracking that address the multi-chunk ISR corruption described.

Possibly related PRs

  • FastLED/FastLED#2648: Related prior work on ESP32 LCD_CLOCKLESS chunking/IRAM/ISR safety; this PR builds on those fixes with a worker-task approach.
  • FastLED/FastLED#2691: Both PRs adjust chunk-sizing and beginTransmission/transmit sequencing in the clockless driver.
  • FastLED/FastLED#2251: Related changes to LcdSpiPeripheralEsp transmit/semaphore/busy handling and initialization.

Poem

A rabbit hops through fbuild's field so bright,
While ISRs wake their workers in the night.
No chunks corrupt as tasks divide the load,
AutoResearch boards now take the proper road. 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.71% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: stream ESP32-S3 LCD clockless chunks' directly addresses the main objective from #2693 of fixing multi-chunk transmission corruption on ESP32-S3 LCD_CLOCKLESS by streaming chunks.
Linked Issues check ✅ Passed The PR addresses all coding requirements from #2690 (board: filter for AutoResearch, regression tests) and #2693 (worker-task chunk streaming, byte-perfect multi-chunk transmission, existing case preservation).
Out of Scope Changes check ✅ Passed All changes are directly scoped to #2690 and #2693 objectives: AutoResearch filter semantics, fbuild-only selection, LCD chunk worker-task architecture, and regression test coverage.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/2690-2693-autoresearch-lcd

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Closes #2690
Closes #2693

Also keeps AutoResearch on the fbuild-only path for board builds.
@zackees
zackees force-pushed the fix/2690-2693-autoresearch-lcd branch from 6c0fca7 to fa79f3f Compare June 3, 2026 21:27
@zackees
zackees marked this pull request as ready for review June 3, 2026 21:28
@fastled-project-sync fastled-project-sync Bot moved this from In Progress to Triage in FastLED Tracker Jun 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
ci/tests/test_sketch_filter.py (1)

731-763: ⚡ Quick win

Move the new local imports to module scope.

These imports are deterministic test dependencies, so keeping them at the top of the file will match the repo's Python import rule and keep the new test class cleaner. As per coding guidelines, "All system imports must be at the top of the file in proper order: standard library, third-party, local".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ci/tests/test_sketch_filter.py` around lines 731 - 763, Move the
deterministic test imports out of the test methods and place them at module
scope: import get_example_ino_path from ci.compiler.board_example_utils and
import create_board and should_skip_example_for_board from
ci.boards/ci.compiler.board_example_utils at the top of the file; then remove
the local imports inside test_autoresearch_filter_parsing,
test_autoresearch_supported_boards_compile, and
test_autoresearch_incompatible_boards_stay_filtered so those functions reference
the module-level symbols instead.
tests/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp (1)

214-215: ⚡ Quick win

Keep an explicit DRAINING assertion before the first completion.

These updates now only check transmit counts after show(). If poll() regresses to READY while the initially queued DMA transfers are still pending, all of these tests would still pass, which leaves the new pending-transmit contract under-covered. Add a pre-completion state check in each case.

Suggested pattern
 driver.show();

+FL_CHECK(driver.poll() == IChannelDriver::DriverState::DRAINING);
 FL_CHECK(mock.getTransmitCount() == 2);

 mock.simulateTransmitComplete();

Also applies to: 233-244, 273-276, 387-394

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp`
around lines 214 - 215, The tests only assert transmit counts after calling
show() and completions, missing a pre-completion check that the channel has
entered the DRAINING state; add an explicit assertion that poll() (or the
channel/driver poll method used in these tests) returns/indicates DRAINING
immediately after show() and before simulating the first completion so the
pending-transmit contract is exercised — update the test locations that
currently call show(), then later check mock.getTransmitCount() (the blocks
around the current mock.getTransmitCount() assertions and usages at the other
noted ranges) to insert a DRAINING-state assertion right after show() and before
any completion simulation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp`:
- Around line 343-353: The code currently clears mIsrCtx and releases
mTransmittingChannels as soon as mIsrCtx.mStreamError is set, which can race
with an earlier queued DMA chunk still completing; change the branch in
channel_driver_lcd_clockless.cpp.hpp so we only clear state and release channels
once the peripheral is actually idle — i.e. require peripheralIdle for the error
path as well (replace the condition if ((streamDone && peripheralIdle) ||
mIsrCtx.mStreamError) with logic that requires peripheralIdle when
mIsrCtx.mStreamError is true, or alternatively track outstanding chunks (e.g.
mIsrCtx.mPendingChunks) and only clear mIsrCtx.mStreamError/mStreamComplete and
set mBusy=false after peripheral->isBusy() is false or pendingChunks == 0),
ensuring mIsrCtx.mStreamComplete/mStreamError are not reset until the last DMA
callback can no longer run.

In `@src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.h`:
- Around line 101-102: Replace the volatile fields with ISR-safe atomics and use
atomic operations everywhere they’re touched: change mPendingTransmits to
std::atomic<size_t> and mBusy to std::atomic<bool>, then update
transmitInternal(), waitTransmitDone(), isBusy() to use
.fetch_add(1)/.fetch_sub(1) and .load() (with appropriate memory_order or
defaults), and modify the ISR routine lcd_spi_flush_ready() to use .fetch_sub(1)
and .store(...) instead of plain reads/writes; this ensures
increments/decrements and reads are atomic across the ISR and task contexts and
prevents lost updates during panel IO recreation.

---

Nitpick comments:
In `@ci/tests/test_sketch_filter.py`:
- Around line 731-763: Move the deterministic test imports out of the test
methods and place them at module scope: import get_example_ino_path from
ci.compiler.board_example_utils and import create_board and
should_skip_example_for_board from ci.boards/ci.compiler.board_example_utils at
the top of the file; then remove the local imports inside
test_autoresearch_filter_parsing, test_autoresearch_supported_boards_compile,
and test_autoresearch_incompatible_boards_stay_filtered so those functions
reference the module-level symbols instead.

In `@tests/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp`:
- Around line 214-215: The tests only assert transmit counts after calling
show() and completions, missing a pre-completion check that the channel has
entered the DRAINING state; add an explicit assertion that poll() (or the
channel/driver poll method used in these tests) returns/indicates DRAINING
immediately after show() and before simulating the first completion so the
pending-transmit contract is exercised — update the test locations that
currently call show(), then later check mock.getTransmitCount() (the blocks
around the current mock.getTransmitCount() assertions and usages at the other
noted ranges) to insert a DRAINING-state assertion right after show() and before
any completion simulation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c987a0ec-ea43-4cde-b002-090b5eddc762

📥 Commits

Reviewing files that changed from the base of the PR and between 7412393 and fa79f3f.

📒 Files selected for processing (13)
  • ci/autoresearch/build_driver.py
  • ci/autoresearch/phases.py
  • ci/tests/test_autoresearch_phases.py
  • ci/tests/test_fbuild_default_selection.py
  • ci/tests/test_sketch_filter.py
  • examples/AutoResearch/AutoResearch.ino
  • src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp
  • src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.h
  • src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_spi.cpp.hpp
  • src/platforms/esp/32/drivers/lcd_spi/ilcd_spi_peripheral.h
  • src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.cpp.hpp
  • src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.h
  • tests/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp

Comment on lines 101 to +102
volatile bool mBusy;
volatile size_t mPendingTransmits;

@coderabbitai coderabbitai Bot Jun 3, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify that mPendingTransmits/mBusy are touched from both ISR and task paths,
# and that those accesses are not protected by an ISR-safe critical section or atomic primitive.
rg -n -C2 'mPendingTransmits|mBusy' \
  src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.h \
  src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.cpp.hpp

rg -n -C2 'portENTER_CRITICAL|portEXIT_CRITICAL|portENTER_CRITICAL_ISR|portEXIT_CRITICAL_ISR|std::atomic|atomic_' \
  src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.h \
  src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.cpp.hpp

Repository: FastLED/FastLED

Length of output: 7407


Make mPendingTransmits/mBusy ISR-safe (don’t rely on volatile).

mPendingTransmits and mBusy are modified/consumed across ISR + task contexts: the ISR (lcd_spi_flush_ready() in src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.cpp.hpp) decrements mPendingTransmits and sets mBusy, while task code (transmitInternal(), waitTransmitDone(), and isBusy()) increments/reads the same members. The counter updates are plain read-modify-write (mPendingTransmits = mPendingTransmits +/- 1), and there’s no ISR-safe critical section/atomic primitive guarding these accesses—so an ISR preempting a task update can lose increments/decrements and leave the count wrong, breaking isBusy()/waitTransmitDone() and potentially bypassing the mPendingTransmits > 0 guard before esp_lcd_panel_io_del() during panel-IO recreation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/platforms/esp/32/drivers/lcd_spi/lcd_spi_peripheral_esp.h` around lines
101 - 102, Replace the volatile fields with ISR-safe atomics and use atomic
operations everywhere they’re touched: change mPendingTransmits to
std::atomic<size_t> and mBusy to std::atomic<bool>, then update
transmitInternal(), waitTransmitDone(), isBusy() to use
.fetch_add(1)/.fetch_sub(1) and .load() (with appropriate memory_order or
defaults), and modify the ISR routine lcd_spi_flush_ready() to use .fetch_sub(1)
and .store(...) instead of plain reads/writes; this ensures
increments/decrements and reads are atomic across the ISR and task contexts and
prevents lost updates during panel IO recreation.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flagging for human review: ISR/task race on volatile mPendingTransmits/mBusy is real, but converting to std::atomic touches the singleton's IRAM-safe hot path and warrants a maintainer's call on memory_order and the broader recreation-during-IO scenario. Deferring per the address-reviews security-flag policy — not auto-fixing in this PR.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zackees, understood — the rationale is solid: std::atomic on IRAM-resident paths requires careful memory_order selection (likely memory_order_relaxed for the ISR decrement + memory_order_release/acquire for the task-side load, but that warrants deliberate review), and the panel-IO recreation guard interacts with it in a non-trivial way.

Would you like me to open a follow-up GitHub issue to track this so it doesn't get lost? I can file it with the relevant details (affected fields, affected methods, and the IRAM/atomic constraint) as a backlink to this PR and comment.


🧠 Learnings used
Learnt from: zackees
Repo: FastLED/FastLED PR: 0
File: :0-0
Timestamp: 2026-05-24T15:31:46.546Z
Learning: In the FastLED repository, the `running-process` dependency bump from 3.4.1 to 4.0.0 (PR `#2506`) is a Rust-side mono-crate consolidation only. The Python (`pip install running-process`) ABI is explicitly unchanged in the 4.0.0 CHANGELOG. All tests passed locally (6/6 and 27/27). The author of running-process is also the maintainer of this PR (zackees).

CodeRabbit flagged that queueTransmit() keeps up to two LCD transactions
in flight, so a failed follow-up submission could leave an earlier chunk
still completing asynchronously inside LcdSpiPeripheralEsp. The previous
poll() branch released mIsrCtx and the transmitting channels as soon as
mStreamError was set, allowing the trailing ISR callback to land on a
torn-down or newly-started stream.

Require peripheralIdle for both the streamDone and mStreamError paths so
state is only cleared after the final DMA callback has run.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp (1)

349-367: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Keep the errored stream in DRAINING until the last queued DMA completes.

This cleanup guard is correct, but the state machine still reopens too early because processWorkerQueue() clears mBusy on a queueTransmit() failure before the already-queued chunk has finished. poll() then falls through to READY, and show() can overwrite mTransmittingChannels / reset mIsrCtx while the stale completion callback is still in flight.

Suggested fix
diff --git a/src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp b/src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp
@@
         if (!submitChunk(submitted, false)) {
             ctx.mStreamError = true;
             ctx.mStreamComplete = true;
-            mBusy = false;
             break;
         }

If you want extra belt-and-suspenders protection, poll() can also return DRAINING whenever mTransmittingChannels is still non-empty and cleanup has not executed yet.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp`
around lines 349 - 367, The poll() path must keep the driver in DRAINING while
any previously-queued DMA can still complete; update poll() so it returns
DriverState::DRAINING not only when mBusy is true but also when
mTransmittingChannels is non-empty or cleanup hasn’t run yet (i.e., when an
errored stream may still have pending callbacks), so that
show()/processWorkerQueue()/queueTransmit() cannot clear mIsrCtx or reset
mTransmittingChannels prematurely; also ensure processWorkerQueue() does not
clear mBusy on queueTransmit() failure (leave mBusy until the final DMA
completion/cleanup sets it false) so the combined check in poll() (mBusy ||
!mTransmittingChannels.empty()) prevents reopening the stream.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp`:
- Around line 349-367: The poll() path must keep the driver in DRAINING while
any previously-queued DMA can still complete; update poll() so it returns
DriverState::DRAINING not only when mBusy is true but also when
mTransmittingChannels is non-empty or cleanup hasn’t run yet (i.e., when an
errored stream may still have pending callbacks), so that
show()/processWorkerQueue()/queueTransmit() cannot clear mIsrCtx or reset
mTransmittingChannels prematurely; also ensure processWorkerQueue() does not
clear mBusy on queueTransmit() failure (leave mBusy until the final DMA
completion/cleanup sets it false) so the combined check in poll() (mBusy ||
!mTransmittingChannels.empty()) prevents reopening the stream.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2c02ac54-a827-4bf1-9b7a-e6546e9a444c

📥 Commits

Reviewing files that changed from the base of the PR and between fa79f3f and f1d73f6.

📒 Files selected for processing (1)
  • src/platforms/esp/32/drivers/lcd_spi/channel_driver_lcd_clockless.cpp.hpp

@zackees
zackees merged commit 65c95b2 into master Jun 3, 2026
15 checks passed
@zackees
zackees deleted the fix/2690-2693-autoresearch-lcd branch June 3, 2026 22:18
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

1 participant