Display stuck on the "RGB" test image on MIPI-DSI (ESP32-P4) since ESPHome 2026.11 – deprecated draw_pixels_at() with ColorOrder
Problem
After updating from ESPHome 2026.10 to 2026.11.0, the display on ESP32-P4 boards using the mipi_dsi platform only shows the default test image (colour pattern with the text "RGB") and never updates. Everything else keeps working:
- the WebSocket connection to the server is established (
[ws] connected) - the server renders the page correctly (visible via DevTools)
- touch input is sent to the server and handled
Only the tiles never show up on the panel. Downgrading to 2026.10 fixes it.
Tested on:
- Guition JC4880P443 (
mipi_dsi, modelJC4880P443, 480×800,rotation: 90inremote_webview) - Guition JC1060P470 (
mipi_dsi, modelJC1060P470)
Client: main @ 1dae5a2, server: strangev/remote-webview-server:latest
Note
I'm not opening a PR myself. The analysis and the patch above were worked out with the help of an AI assistant (Claude Code), and I'm not familiar enough with the ESPHome display internals to be sure this is the right way to fix it. What I can confirm: with this change both of my ESP32-P4 displays show the dashboard again on ESPHome 2026.11.0, with correct colours, and the build compiles without errors. Please treat the diff as a starting point and feel free to fix it differently.
Root cause
ESPHome 2026.11 deprecated the draw_pixels_at() overload with a ColorOrder argument (esphome#20884 "Drop the color order from draw_pixels_at() and ColorUtil"). Drivers now override draw_pixels_internal() instead.
mipi_dsi no longer overrides the old ColorOrder form. remote_webview still calls that form in draw_rgb565_clipped_(), so the call ends up in the generic Display::draw_pixels_at(..., ColorOrder, ...). That function only writes the pixels one by one into the driver's frame buffer via draw_pixel_at(). mipi_dsi sends that buffer to the panel only inside update(). That is never called here, because there is no lambda or page and the poller is stopped. So the pixels never reach the panel. The test image drawn and flushed once during the first update() stays on screen.
The new overload without ColorOrder goes through MipiDsi::draw_pixels_internal(), which copies the block and pushes it to the panel immediately.
A second point: mipi_dsi now honours the big_endian flag. Before, it ignored the flag and assumed the bytes matched the panel. The P4 hardware JPEG decoder outputs native little-endian RGB565, but the client passes rgb565_big_endian_, which defaults to true, for those tiles too. On 2026.11 that byte order no longer matches the panel. Every tile then goes through the slow per-pixel fallback with swapped bytes, which gives wrong colours.
Fix (tested on both devices, picture and colours correct)
--- a/components/remote_webview/remote_webview.cpp
+++ b/components/remote_webview/remote_webview.cpp
@@ -1,6 +1,7 @@
#include "remote_webview.h"
#include "remote_webview_config.h"
#include "esphome/core/log.h"
+#include "esphome/core/version.h"
@@ -746,9 +748,11 @@
+ // The P4 JPEG engine (RGB565, BGR element order) writes native little-endian pixels,
+ // independent of the big_endian option (which only steers the software decoder).
draw_rgb565_clipped_(dst_x, dst_y, (int)hdr.width, (int)hdr.height, aligned_w, hw_decode_output_buf_,
std::min<int>(dst_x + (int)hdr.width, display_width_),
- std::min<int>(dst_y + (int)hdr.height, display_height_));
+ std::min<int>(dst_y + (int)hdr.height, display_height_), false);
@@ -787,12 +791,12 @@
int RemoteWebView::jpeg_draw_cb_(JPEGDRAW *p) {
draw_rgb565_clipped_(p->x, p->y, p->iWidth, p->iHeight, p->iWidth, (const uint8_t *)p->pPixels,
- sw_clip_x1_, sw_clip_y1_);
+ sw_clip_x1_, sw_clip_y1_, rgb565_big_endian_);
return 1;
}
void RemoteWebView::draw_rgb565_clipped_(int x, int y, int w, int h, int stride, const uint8_t *pixels,
- int clip_x1, int clip_y1) {
+ int clip_x1, int clip_y1, bool big_endian) {
@@ -801,11 +805,22 @@
const int64_t t0 = esp_timer_get_time();
+#if ESPHOME_VERSION_CODE >= VERSION_CODE(2026, 11, 0)
+ display_->draw_pixels_at(x, y, w, h, pixels,
+ esphome::display::COLOR_BITNESS_565,
+ big_endian,
+ x_off, y_off, stride - x_off - w);
+#else
display_->draw_pixels_at(x, y, w, h, pixels,
esphome::display::COLOR_ORDER_RGB,
esphome::display::COLOR_BITNESS_565,
- rgb565_big_endian_,
+ big_endian,
x_off, y_off, stride - x_off - w);
+#endif
ft_draw_us_ += (uint32_t)(esp_timer_get_time() - t0);
}
--- a/components/remote_webview/remote_webview.h
+++ b/components/remote_webview/remote_webview.h
@@ -220,9 +220,9 @@
- // [0, clip_x1) × [0, clip_y1).
+ // [0, clip_x1) × [0, clip_y1). `big_endian` is the real byte order of `pixels`.
void draw_rgb565_clipped_(int x, int y, int w, int h, int stride, const uint8_t *pixels,
- int clip_x1, int clip_y1);
+ int clip_x1, int clip_y1, bool big_endian);
With the patch I also set big_endian: false in YAML. The mipi_dsi panels store little-endian RGB565, so tiles that fall back to the software decoder also take the fast block-copy path. With true they are still drawn correctly on 2026.11, just per pixel.
Older ESPHome versions still compile the original call through the #else branch, so nothing changes for them. As a side effect, the deprecation warning on 2026.11 goes away. The old form will be removed in 2027.5.0.
Environment / config
- ESPHome 2026.11.0 (ESP-IDF 5.5.6), works with 2026.10
espressif/esp_websocket_client1.5.0bitbank2/jpegdecfrom https://github.com/strange-v/jpegdec-esphomehw_decodeenabled (default)
Relevant part of the config (JC4880P443):
display:
- platform: mipi_dsi
model: JC4880P443
color_order: RGB
dimensions:
width: 480
height: 800
remote_webview:
server: <server>:8081
url: <dashboard url>
tile_size: 128
rotation: 90
full_frame_tile_count: 1
max_bytes_per_msg: 184320
jpeg_quality: 85
No lambda, pages or update_interval on the display, so the display's own update() only runs once at boot.
Thanks for the detailed report and for testing the patch! The fix has been committed.