Is it possible to use DRM API to rotate the screen ?

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

Is it possible to use DRM API to rotate the screen ?

529 Views
Derek0902
Contributor II

Hi,

My custom board use i.MX8MQ processor and develop with Linux 6.1.

If I want to rotate the screen, it can set the transform in weston.ini. But it need to restart the weston service to make it effective. I hope it can rotate the Weston desktop dynamically.

I found that i.MX8MQ processor use DCSS to display. DCSS is composed of DRM display framework.

So, Is it possible to use DRM API to develop screen-rotation or is there any other way?

 

Regards,

Derek Lin

0 Kudos
Reply
4 Replies

509 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Derek0902 

This is possible, but this need weston development experience. You need modify weston compositor source code, add such userspace interface and then realize dynamical rotate.

You can try gnome desktop which may have such function.

L6.1.55_2.2.0_iMX_Linux_Distribution_POC_Docs

L6.1.36_2.1.0_iMX_Linux_Distribution_POC_Docs

L6.1.22_2.0.0_iMX_Linux_Distribution_POC_Docs

L6.1.1_1.0.0_iMX_Linux_Distribution_POC_Docs

0 Kudos
Reply

501 Views
Derek0902
Contributor II

Hi @Zhiming_Liu ,

So, DRM API cannot rotate the screen, right?

If I want to rotate screen dynamically, I need to modify weston source code. Or use gnome desktop by following iMX_Linux_Distribution_POC_Docs ?

 

Thanks & Regards,

Derek Lin

0 Kudos
Reply

482 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

So, DRM API cannot rotate the screen, right?

--> You need to modify the weston code logic, which essentially also rotate by modifying the parameters passed to the drm.

Or use gnome desktop by following iMX_Linux_Distribution_POC_Docs ?

--> Test other compositor is the quickest way to do it.

0 Kudos
Reply

474 Views
Derek0902
Contributor II

Hi @Zhiming_Liu ,

Is there any reference about modifying Weston code logic ?

 

I has ported many devices on my custom board. If I want to use gnome desktop, I need to rebuild the environment and image, right?

 

Thanks & Regards,

Derek Lin

 

0 Kudos
Reply