I.MX 1060 SDK lvgl guider - rotation display

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

I.MX 1060 SDK lvgl guider - rotation display

6,338 Views
masterboy
Contributor III

Hi,

I have a kit with an imx 1060 processor that has the RK043FN02H display. I have downloaded the SDK for this processor and am trying to modify the LVGL guider example. I would need to rotate the display output to portrait. Currently, the display dump is in landscape. I tried adding the lv_disp_set_rotation(NULL, LV_DISP_ROT_90) function to the AppTask task, right after the initialization function. The result is a "blurry" image. The same thing happens if I set the angle to 270 degrees (LV_DISP_ROT_270). If I set the angle to 180 degrees (LV_DISP_ROT_180), the orientation of the dump is the same as if I had not used this function, yet the dump is supposed to be upside down.
What is interesting is that the button touch surface (coordinates) move to the correct positions, but the render does not.
Apparently there is some issue with the buffer rendering or transformation. Unfortunately, no matter what I try, I can't seem to resolve it. Therefore, I would like to reach out to NXP support and advice. Thank you.

Tags (4)
0 Kudos
Reply
11 Replies

5,535 Views
joey_weng
NXP Employee
NXP Employee

Hi Pavel:

For RT1060 EVK, RK043FN02H-CT is replaced by RK043FN66HS-CTG. I assume this new panel doesn't support LVGL rotate function as well, is that correct?

Due to they have similar design except LCD driver chip and the whole architecture should be same or similar.

Thanks for clarification.

 

0 Kudos
Reply

6,317 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, my name is Pavel, and I will be supporting your case, this issue was reported in the past, in this thread somebody updates a part of the code lv_port_disp_init configuration you can try this. 

LPC54S018 rotate display to portrait failed with lvgl - How-to - LVGL Forum

Best regards,
Pavel

0 Kudos
Reply

6,304 Views
masterboy
Contributor III

Hello Pavel,

Thank you for your quick response to my query.
I looked at the link and went through it, but I have to say I didn't come to anything. The only thing I could do was to rotate the display 180 degrees with the image rotated correctly, but I had to set full_refresh = 0. This resulted in the display flickering when I touched the button.
As you noted, this problem has been known about for some time. So who is solving this problem? Is there any other solution? Thank you.

 

lv_port_disp_init settings:

sw_rotate = 1; rotated = 1 | 2 | 3; full_refresh = 1; => BLACK SCREEN

sw_rotate = 1; rotated = 1 | 3; full_refresh = 0;

IMG_0041.png

sw_rotate = 1; rotated = 2; full_refresh = 0;

IMG_0042.png

 

0 Kudos
Reply

6,295 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, I think you do not notice the code for the init driver, maybe could help you.

In another way, if this not working for you let me know.

Best regards,
Pavel

0 Kudos
Reply

6,291 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, I review the example and I test it with the code I send and as same your test has the same results.

I was research more information about this and I found the next infdormation.

The full refresh mode should be used if the panel does not have external display controller accessed by MCU via serial link, as for the RK043FN02H-CT used in the demo. https://docs.lvgl.io/master/porting/display.html?highlight=rotation#display-driver"Pavel_Hernandez_0-1678818246408.png

And the example requires full refresh which does not support software rotation.
Pavel_Hernandez_1-1678818266191.png

Therefore, it's confirmed that RT1060-EVK with RK043FN02H-CT panel doesn't support LVGL display rotation.

Best regards,
Pavel

0 Kudos
Reply

6,276 Views
masterboy
Contributor III

Hi, I suspected this to be the case as I have not been able to find anything about this problem and most importantly everything I have tried has not worked
So there is no solution how I can use this display in portrait mode? What if I modified the buffer that will be rendered in some way? Would that be a solution?
Next, in my search I came across rotating the image using PXP. Unfortunately I didn't understand how I would implant this into my solution. If you know how to do this, I'd be happy to have your advice. Thank you.

0 Kudos
Reply

6,257 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, review in the SDK there are some examples too, about the PXP.

Pavel_Hernandez_0-1678924286429.png

Best regards,
Pavel

 

0 Kudos
Reply

6,251 Views
masterboy
Contributor III

Hi Pavel,

I want to go back to the previous answer. I have examined the LVGL library code and the beginning of the draw_buff_rotate() function. What is checked at the beginning is only for software rotation of the display. This will not work for every display if the sw_rotate and full_refresh flags are set in the display driver. I could understand this.
I have two questions:
1. What I don't understand is why it is not possible to rotate the image on my display hardware even though the library supports it. Rather, isn't the fault on the side of the gpu processor itself and the implementation of the LVGL driver for that particular processor?
2. The LVGL SDK always uses full display refresh (full_refresh flag with a large buffer). Partly this problem could be solved if the buffer size as written in the documentation was only 1/10 of the size. Then software rotation could work. I tried editing the code, but I can't get the project set up correctly. I would appreciate some help on this.

Thank you.

0 Kudos
Reply

6,215 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, sorry for the late response, I do not have more information about this comment from the SW RD: The RT1060-EVK with RK043FN02H-CT panel doesn't support LVGL display rotation.

Best regards,
Pavel

0 Kudos
Reply

6,166 Views
masterboy
Contributor III

Hi, Pavel,

Could I ask you, if it would be possible, to advise how to apply this feature to the LVGL guider example using the PXP rotation SDK example? Thank you.

0 Kudos
Reply

5,997 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, sorry for the late response, that is not possible to make this, I recommend trying if you could combine these examples.

Best regards,
Pavel

0 Kudos
Reply