LVGL Demo Example Working too slowly problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LVGL Demo Example Working too slowly problem

324件の閲覧回数
burhanhagi
Contributor IV

Hi,

I am trying to understand LVGL for my project. I currently use Embedded Wizard for my project however, I may decide to replace it with LVGL. For that reason I am trying GUI-GUIDER-1.9.1-GA IDE on windows. I already have one MIMXRT1160-EVK board and so try sample examples in GUI GUIDER on that. 

I am using v8.3.10 LVGL release and so MCUX SDK 2.16.000 package. While using it, I am creating and testing ScreenTransition Example on EVB Board. 

When I deploy the built code to board with GUI GUIDER by clicking Run -> Build & Target -> MCUXpresso, it works however even though I checked VGLite option under Settings menu and Dİsplay Refresh Period(ms) as 10 and check all Monitor flags, I just see 8-10 FPS UI and CPU usage nearly %90. 

So, it seems as if VGLite were not working well instead as if it were done with CPU. 

I check it debugger but, in debugger All VGLite functions are executing. I put some breakpoints in files related with VGLite drawing under the folder lvgl/draw/nxp/vglite  functions. 

If this is the caused by LVGL itself, then LVGL really works very slowly. In Embedded wizard, I can run this type of widgets as 60Fps. 

My other strange finding is that. I am importing this all generated code by GUI GUIDER in project folder to MCUXpresso IDE as new project. And there, I am recompiling all code and then loads to my board with my Ulink debugger. But when I do this, program again works well, however this time FPS value is dropping to 3-4 FPS levels. So, it works barely on my EVB Board.

 

I tried some MPU config settings by enabling and disabling cache.  Closing and opening VGLite etc. however, it does not give me more than 4 fps. So why this method is yielding to different result? All the codes I am using are the ones directly got from GUI GUIDER output files. What is the problem?

 

I need to see 60FPS values with this ScreenTransition example. Please help me about it. Thanks a lot in advance

タグ(4)
0 件の賞賛
返信
7 返答(返信)

236件の閲覧回数
burhanhagi
Contributor IV

Hi @WenbinYuan,

 I modified the DEMO_FlushDisplay(.....) function like the below;

static void DEMO_FlushDisplay(lv_disp_drv_t *disp_drv,

const lv_area_t *area,

lv_color_t *color_p)

{

int32_t x, y;

int32_t w = (area->x2 - area->x1 + 1);

int32_t h = (area->y2 - area->y1 + 1);

 

for (y = 0; y < h; y++)

{

memcpy(&s_frameBuffertemp[area->y1 + y][area->x1],

color_p + y * w,

w * sizeof(lv_color_t));

}

 

 

SCB_CleanInvalidateDCache_by_Addr((void *)&s_frameBuffertemp[area->y1][area->x1],

w * h * sizeof(lv_color_t));

 

 

g_dc.ops->setFrameBuffer(&g_dc, 0, (void *)s_frameBuffertemp);

 

lv_disp_flush_ready(disp_drv);

}

 

and added the below line to upmost of the file named "lvlg_support.c"

static uint32_t s_frameBuffertemp[DEMO_PANEL_HEIGHT][DEMO_PANEL_WIDTH] __attribute__((aligned(32)));

 

this time, widget runs faster. However, as you see in the code; I added an intermideate buffer and does copying operation with

CPU. So I do have to make this operation with VGLite.

 

As per my understanding; examples does not consider the "area" parameter in

static void DEMO_FlushDisplay(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p) function. That is why;

when I set disp_drv.full_refresh value as 0. the screen gets corrupted.

So, I need your help for writing above code with VGLite or any function which takes into effect "area" parameter for partial mode screen refresh

 

0 件の賞賛
返信

231件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @burhanhagi,

The partial refresh feature is not supported on the i.MX RT's MIPI peripheral, as mentioned in the following post: Solved: LVGL MIPI screen can't enter to partial refresh mode - NXP Community.

I tested the same project with the same LVGL library on the MIMXRT1160-EVK and got 10fps on the same screen. If you wish to improve the performance, please implement the following adaptations: GUIGUIDERUG_1.9.1: GUI Guider v1.9.1 User Guide | NXP Semiconductors

BR,
Edwin.

0 件の賞賛
返信

222件の閲覧回数
burhanhagi
Contributor IV

Hi @EdwinHz,

How much maximum FPS Can I reach when I implement the adaptions you suggest? Can I reach more than 30FPS?

I reviewed the adaptions link, but seems page not exist anymore. I could not view the page.

 

I read the link why partial mode is not supported. But I do not understand why it is impossible. Actually the link says nothing new for me and also does not mention why partial mode is not implemented. What is the problem with partial mode? If I use another different Display, such as 1280x800 Mipi Display, Is not it possible to implement partial Refresh? I really wonder what is the obstacle behind it?

0 件の賞賛
返信

166件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @burhanhagi,

> How much maximum FPS Can I reach when I implement the adaptions you suggest? Can I reach more than 30FPS?
You would have to perform the tests yourself.

> I reviewed the adaptions link, but seems page not exist anymore. I could not view the page.
You can find the information I am referring to on section "6.3 Performance optimization" of the following link: https://www.nxp.com/webapp/Download?colCode=GUIGUIDERUG_1.9.1

> What is the problem with partial mode? If I use another different Display, such as 1280x800 Mipi Display, Is not it possible to implement partial Refresh?
It's an issue with the MIPI peripheral of the RT1160 itself, so changing the display will unfortunately result in the same problem.

 

0 件の賞賛
返信

252件の閲覧回数
burhanhagi
Contributor IV

Hi @WenbinYuan,

My display panel code : RK055HDMIPI4MA0 ( 720 (width) x 1280 (height) )

In below; I added 2 different short videos displaying the problem occuring. Please view the videos in the link.

In code, there is a file named lvgl_support.c under the folder "board". All display pre-config settings is being done there.

I am changing the values of two variables of structure within that file.

/* Partial refresh */

disp_drv.full_refresh = 1;

disp_drv.direct_mode = 0;

 

In first video; I have set full_refresh as 0 and direct_mode as 1. However, as you notice in the video, fps values reaches 20fps but widget runs abnormal, especially while changing and restoring the screen.

In second video; I ahve set full_refresh as 1 and direct_mode as 0. But this time fps values is about 7-8 fps. But this time screen runs as expected as always. But runs very slowly as I said. Both of videos are complied with optimization level as -O3.

IMXRT1166EvalBoard_lvgl_works_too_slowly

As I already said, In embedded wizard I can run this widget as nearly 60Fps but in LVGL seems not reachable even 30Fps values.

0 件の賞賛
返信

266件の閲覧回数
burhanhagi
Contributor IV

Hello,

Difference between running the code directly over GUI GUIDER and importing & compiling & running from MCUXPresso IDE is caused by Compiler Optimization. I selected both C++ and C Compiler Optimization to Level -O3(Most). and it results FPS value to higher 7-8 FPS. This FPS value now is the same as output of GUI GUIDER when I loaded & run to my board over it.

 

But as I said before 7-8 FPS is very very low. Even though widget is so simple, it barely runs. Which point am I missing?

0 件の賞賛
返信

259件の閲覧回数
WenbinYuan
NXP Employee
NXP Employee

Hello @burhanhagi,

May I know what display panel you are using? 

The low FPS issue is mainly caused by large resolution(720x1280) and full screen refresh mechanism, and the Meter widget is also hign load with customized ticks, arc and needles.

 

Best Regards,

Wenbin

0 件の賞賛
返信