Skip to content

Commit 93fdbf2

Browse files
committed
feat(lcd): Allow to disable low-power mode in DPI panel
1 parent 406dfc1 commit 93fdbf2

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

components/esp_lcd/dsi/esp_lcd_panel_dpi.c

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,22 @@ esp_err_t esp_lcd_new_panel_dpi(esp_lcd_dsi_bus_handle_t bus, const esp_lcd_dpi_
256256
mipi_dsi_hal_host_dpi_set_color_coding(hal, panel_config->pixel_format, 0);
257257
// these signals define how the DPI interface interacts with the controller
258258
mipi_dsi_host_ll_dpi_set_timing_polarity(hal->host, false, false, false, false, false);
259-
// configure the low-power transitions: defines the video periods which are permitted to goto low-power if the time available to do so
260-
mipi_dsi_host_ll_dpi_enable_lp_horizontal_timing(hal->host, true, true);
261-
mipi_dsi_host_ll_dpi_enable_lp_vertical_timing(hal->host, true, true, true, true);
259+
260+
if (panel_config->flags.disable_lp) {
261+
// configure the low-power transitions: defines the video periods which are NOT permitted to goto low-power
262+
mipi_dsi_host_ll_dpi_enable_lp_horizontal_timing(hal->host, false, false);
263+
mipi_dsi_host_ll_dpi_enable_lp_vertical_timing(hal->host, false, false, false, false);
264+
// commands are NOT transmitted in low-power mode
265+
mipi_dsi_host_ll_dpi_enable_lp_command(hal->host, false);
266+
} else {
267+
// configure the low-power transitions: defines the video periods which are permitted to goto low-power if the time available to do so
268+
mipi_dsi_host_ll_dpi_enable_lp_horizontal_timing(hal->host, true, true);
269+
mipi_dsi_host_ll_dpi_enable_lp_vertical_timing(hal->host, true, true, true, true);
270+
// commands are transmitted in low-power mode
271+
mipi_dsi_host_ll_dpi_enable_lp_command(hal->host, true);
272+
}
262273
// after sending a frame, the DSI device should return an ack
263274
mipi_dsi_host_ll_dpi_enable_frame_ack(hal->host, true);
264-
// commands are transmitted in low-power mode
265-
mipi_dsi_host_ll_dpi_enable_lp_command(hal->host, true);
266275
// using the burst mode because it's energy-efficient
267276
mipi_dsi_host_ll_dpi_set_video_burst_type(hal->host, MIPI_DSI_LL_VIDEO_BURST_WITH_SYNC_PULSES);
268277
// configure the size of the active lin period, measured in pixels

components/esp_lcd/dsi/include/esp_lcd_mipi_dsi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ typedef struct {
9090
/// Extra configuration flags for MIPI DSI DPI panel
9191
struct extra_dpi_panel_flags {
9292
uint32_t use_dma2d: 1; /*!< Use DMA2D to copy user buffer to the frame buffer when necessary */
93+
uint32_t disable_lp: 1;/*!< Disable low-power for DPI */
9394
} flags; /*!< Extra configuration flags */
9495
} esp_lcd_dpi_panel_config_t;
9596

0 commit comments

Comments
 (0)