Skip to content

fix(e1004): reconfigure panel geometry on deep sleep wakeup - #145

Merged
jonasniesner merged 1 commit into
OpenDisplay:mainfrom
Nixon506E:e1004-dual-cs-plane-open-failed
Aug 7, 2026
Merged

fix(e1004): reconfigure panel geometry on deep sleep wakeup#145
jonasniesner merged 1 commit into
OpenDisplay:mainfrom
Nixon506E:e1004-dual-cs-plane-open-failed

Conversation

@Nixon506E

Copy link
Copy Markdown
Contributor

Issue

  • E1004 waking from deep sleep was logging "E1004 dual-CS plane open failed" and showing static on the screen left half and no update on the right half.

Fix

  • Move geometry configuration from initDisplay to configureBbepPanelGeometry
  • Call on deep sleep wake up as well as initDisplay

Summary

configureBbepPanelGeometry used to live only inline in initDisplay(), which the deep-sleep wake path (main.cpp) skips entirely to save power and keep the panel image. bbep is a plain global (not RTC_DATA_ATTR), so a wake reset zeroes it -- leaving e1004GeometryOk false and bbep.type/native_width/native_height unset for the whole boot. On E1004 that makes every e1004_begin_plane() call after wake fail its geometry guard (logged as "E1004 dual-CS plane open failed") and silently drop the panel payload (directWriteSinkBytes only forwards bytes when e1004GeometryOk), which is what produces static on the left half and a stale right half. Calling this from epdSessionAcquire()'s cold bring-up as well as initDisplay() ensures the type/geometry state exists before any panel command sequence runs, whether this is a fresh cold boot or the first push after waking.

configureBbepPanelGeometry used to live only inline in initDisplay(), which the deep-sleep wake path (main.cpp) skips entirely to save power and keep the panel image. `bbep` is a plain global (not RTC_DATA_ATTR), so a wake reset zeroes it -- leaving e1004GeometryOk false and bbep.type/native_width/native_height unset for the whole boot. On E1004 that makes every e1004_begin_plane() call after wake fail its geometry guard (logged as "E1004 dual-CS plane open failed") and silently drop the panel payload (directWriteSinkBytes only forwards bytes when e1004GeometryOk), which is what produces static on the left half and a stale right half. Calling this from epdSessionAcquire()'s cold bring-up as well as initDisplay() ensures the type/geometry state exists before any panel command sequence runs, whether this is a fresh cold boot or the first push after waking.
@Nixon506E
Nixon506E requested a review from jonasniesner as a code owner August 7, 2026 17:21
@jonasniesner

Copy link
Copy Markdown
Member

Thank you for your contribution

@jonasniesner
jonasniesner merged commit c1b22e6 into OpenDisplay:main Aug 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants