Imx8x (colibri-imx8) screen rotation

Dear community, I am trying to rotate the screen on colibri-imx8 using latest stable BSP 5.7.0 .
The display is connected through a parallel RGB port and the touch controller is connected via I2C.
Here is my device tree overlay
fdt_overlays=colibri-imx8x_parallel-rgb_overlay.dtbo display-lt161010_overlay.dtbo
Looking at the documentation I see the possibility to rotate from device-tree here, so I try to patch the dtb in the following way:

 overlays/display-lt161010_overlay.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/display-lt161010_overlay.dts b/display-lt161010_overlay.dts
index 9b08c66..3f17d54 100644
--- a/display-lt161010_overlay.dts
+++ b/display-lt161010_overlay.dts
@@ -23,6 +23,7 @@
 	status = "okay";
 	width-mm = <154>;
 	height-mm = <86>;
+	rotation = <90>;
 	panel-timing {
 		clock-frequency = <33230769>;

Unfortunately nothing changes and I can’t see any error on dmesg
dmesg.log (27.3 KB)

Am I missing something? Or it is not possible to rotate the screen from dtb?

Thanks in advance,

Hi @SCordibella !

Thanks for posting on community.

Can you please confirm which OS and version are you running on your module? Is thisTorizonCore?

I’d suggest you in the meantime have a look on how to do screen rotation with Weston: Working with Weston on TorizonCore | Toradex Developer Center. This page is designed for TorizonCore but the concepts can be extracted to the Reference Multimedia Image. I’d suggest you to test changing the weston.ini on your machine on both cases and check if this change made the trick before telling you how to make this change permanent in both cases.

Best regards,

Thanks @gclaudino.tx for the answer.

I forgot to write that I am using TorizonCore (tdx-wayland distro).

I already try the weston solution that you suggest, and the rotation is working as expected, but at compositor level. I need to rotate the screen early to rotate also the splash banner.

Do you have any suggestion?

Best regards,

1 Like

Hi @SCordibella,

Thanks for the update! Would rotating the banner itself be a suitable solution for you? You could change the orientation of your splash screen image.

Best regards,

Hi @gclaudino.tx,
I agree with you, but the best solution is to rotate the entire screen early, in order to not handle every single application rotation.
Are there any limitation with my proposal to rotate the screen from device tree overlay?
Could you please suggest an alternative solution to rotate the entire screen at the first stage of linux execution?

Best regards,

Hi @SCordibella, how are you?

Thanks again for updating the topic :smiley:

I did some additional checks to look for the viability of changing it from the device tree. Are you using one of our displays?

The overlay that you’re using points to the panel-dpi node as you can see here:

This node uses the “panel-dpi” driver as the compatible:

If you look at the driver behind the panel-dpi and its reference text it seems that there is no screen rotation available for this specific driver even though panel-common could’ve suggested the opposite:

Therefore, it seems to me not guaranteed that the rotation will work with the display node as it is today.

So, just to be clear on your goal:

  • Once you’ve configured your weston-ini file, every application on runtime should follow the Weston definition as it will use the Weston container to show up.
  • For the before boot, we usually have the splash screen with Torizon and then the module boots up. If changing the banner orientation is not an option, I’d suggest you check for other drivers and test them with the screen you’re using.

Does this make sense to you?

Best regards,

Dear @gclaudino.tx , thank you for the useful and complete answer.
Now it is very clear the problem and the options.
Looking at the imx8x-colibri.dtsi I see the display_lcdif: display@disp1 option.
As far as I understand it can replace actual panel-dpi definition so it could be an option to check if the rotation is supported.
Looking at the documentation I am not able to see if this is true, can you confirm that I can change the device definition and that it support rotation?
If I am wrong, what are the driver alternative to try with our display?
Here is our display datasheet I hope it could help.
UMSH-P250MD-2T_V1_R3_20220530P.PDF (2.6 MB)

Best regards,

To achieve the rotation we did modify the /etc/xdg/weston/weston.ini file:


Hi @SCordibella ! How are you?

The display_lcdif on the device tree has the following compatible: fsl,imx-lcdif-mux-display that is linked to the following driver: lcdif-mux-display.c « imx « drm « gpu « drivers - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules

It’s linked however to the RGB Interface and I can’t guarantee that your display will work with this enabled without doing many other modifications as both drivers would request for different device tree properties. You can see here the requirements for the lcdif fsl-imx-drm.txt « imx « display « bindings « devicetree « Documentation - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules

You could try to do it nevertheless and check if it can improve your results. In order to help you with this, you may find these articles useful:

Finally, I’ve had a look at the display datasheet but could only spot the driver for the touch controller, nothing different for the display itself.

However, I’d strongly suggest you create a rotated splash screen and then customize it with TorizonCore Builder (Splash Screen on TorizonCore | Toradex Developer Center) to match the orientation you’ve defined on the weston-ini as suggested by @zorro ! Also, thanks for joining the topic, your help is really appreciated :smiley:

I’ve also tried to rotate the framebuffer console by enabling some additional kernel parameters but apparently it doesn’t apply to an already existing splash screen.

Please tell us if this helps :slight_smile:

Best regards,

Hi @SCordibella !

Were you able to solve this issue? If yes, please mark the the related answer as the Solution :slight_smile:

Let us know!

Best regards,

Hi @henrique.tx ,
right now we use the rotation from compositor.
I didn’t rotate the splash banner yet, I will close this once the banner rotation will be ok.

Best regards,

1 Like

Hi @SCordibella,

Thanks for the feedback. Let us know if you need anything else.

Best Regards,