Skip to content

Commit

Permalink
Added bounce_buffer_size_px for slint
Browse files Browse the repository at this point in the history
  • Loading branch information
TiKoESoPe committed Nov 27, 2024
1 parent 08ee144 commit be16fd5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/module/display/internal/display_esp32s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ display_mcu_handle_t display_mcu_init(const display_common_hardware_t* config, d
mcu->panel_config.disp_gpio_num = P(config->rgb.disp_en);
mcu->panel_config.flags.disp_active_low = display->mcu_config.rgb.esp32.flags.disp_active_low;
mcu->panel_config.flags.fb_in_psram = display->mcu_config.rgb.esp32.flags.fb_in_psram;
mcu->panel_config.bounce_buffer_size_px = mcu->panel_config.timings.h_res // Width
* mcu->panel_config.timings.v_res // Height
* (display->mcu_config.rgb.esp32.bounce_buffer_size_percent / 100.0); // Percentage of the screen used as bounce buffer

if(config->rgb.data_width == 16)
Expand Down
4 changes: 4 additions & 0 deletions source/module/display/internal/display_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ typedef union display_mcu_rgb_config_s
/// Alignment for framebuffer that allocated in PSRAM
size_t psram_trans_align;
#endif
/// When using psram you can create a bounce buffer that is used to transmit data to the display from the sram.
/// If used, the esp copies the data from psram into sram before the data is sent to the display.
/// Set the value in percent based on the resolution of the display.
float bounce_buffer_size_percent;
}esp32; // ESP32S3 and P4
}rgb;
};
Expand Down
3 changes: 3 additions & 0 deletions source/module/display/sld/display_sld.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ display_handle_t display_sld_init(const display_common_hardware_t* config, const
#endif
device->mcu_config.rgb.esp32.flags.fb_in_psram = true;
device->mcu_config.rgb.esp32.flags.relax_on_idle = false;
#if KERNEL_USES_SLINT
device->mcu_config.rgb.esp32.bounce_buffer_size_percent = 5;
#endif
#endif
//[0] is 0
ASSERT_RET(eeid[1] == 1, goto error, NULL, "Display with DPI needed\n");
Expand Down

0 comments on commit be16fd5

Please sign in to comment.