LVGL cpu usage is too high to display video

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LVGL cpu usage is too high to display video

Jump to solution
843 Views
Vinos
Contributor III

Chip:RT1176DVMAA 

Screen:480x640 MIPI interface.

I import the SDK(2.13.1) example:lvgl_guider_cm7 and only change the MIPI DSI seqence code according to my screen.PXP and VGLite are enabled.

`LV_USE_PERF_MONITOR` is enabled to see cpu usage,but the cpu usage is always 99% even there are only two lables and two buttons.

Two approaches are feasible to decrease the cpu usage:

(1)increase the interval that executes `lv_task_handler()` in the main loop

(2)set the compiler optimizing level to `-O3`,it decreases more.

And the cpu usage decreases from 99% to 27% in this simple screen.If there are more components,the cpu usage is still high.And I have to display the MIPI CSI camera stream to a canvas,and the cpu usage will be 99% again,which leads to unsmooth display.

I think the most likely cause of the issue is the double buffering.

`lv_disp_draw_buf_init(&disp_buf, s_frameBuffer[0], s_frameBuffer[1], 480*640);`

The `s_frameBuffer` need a memory of 480*640*2 bytes,I have to place it to SDRAM instead of internal SRAM,and external ram leads to high CPU usage.It seems the MIPI interface only support full-refresh mode instead of partial-refresh mode.So in this mode the buffer should be so big?

How can I address this issue?

 

 

0 Kudos
1 Solution
819 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @Vinos ,

I have RK055AHD091 so it's 1280*720, the frame fate is 33FPS and CPU occupation is 10%~5%. I didn't change anything, so it use SDRAM, VGLite and PXP, compile option is -O0.

I guess the problem is caused by the settings you've changed.

 

Regards,

Jing

View solution in original post

0 Kudos
1 Reply
820 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @Vinos ,

I have RK055AHD091 so it's 1280*720, the frame fate is 33FPS and CPU occupation is 10%~5%. I didn't change anything, so it use SDRAM, VGLite and PXP, compile option is -O0.

I guess the problem is caused by the settings you've changed.

 

Regards,

Jing

0 Kudos