What is buffer size


Hello for LVGL 9 I was trying to integrate a display, so for initialising the display there was an API named lv_display_set_buffers(display, buf1, buf2, buf_size_byte, render_mode), so I want to know what will be the value for buf_size_byte if I am using the 2 uint8_t buffer of size (400*200)
1 - Size of both buffers added?
2 - Size of both buffers multiplied?
3 - Size of single buffer?

What MCU/Processor/Board and compiler are you using?


What LVGL version are you using?

LVGL 9.0.0

What do you want to achieve?

To initialise the display for LVGL

What have you tried so far?

adding both buffer size

Code to reproduce

Screenshot and/or video


It needs to be set to the size of one buffer in bytes. So if you have a display with 16-bit colors, one pixel would use two bytes.

The size would then be ((400 * 200) * sizeof(uint16_t)) for a display with 400x200 resolution, et cetera.

Thanks @Tinus for the prompt reply, let me try this

I changed the buffer size as mentioned above but I think there is another issue as I have commented out the GPU-related code in lv_disp_drv_t, can anyone help with what to change for LVGL 9 if we are using the below code in lvgl 8.3, so to implement below functionality what needs to be added in LVGL

disp_drv.draw_ctx_init = draw_ctx_init;
disp_drv.draw_ctx_size = sizeof(draw_ctx_t);