dpms mode change with wayland on iMX.6

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

dpms mode change with wayland on iMX.6

2,946 Views
pintukumar
Contributor II

drm‌ imx-drm‌ etnaviv‌ wayland‌ imx6 processor‌

Hi,

Can someone tell me how to change DPMS mode for Wayland based display system ?

I have a iMX.6 (arm 32) board with custom Linux Kernel 3.10 (and heavily patched with DRM mainline kernel) and debian platform running.
The board is connected to one LCD screen and one HDMI monitor.
It have DRM + Wayland setup for display.
Also, I noticed that it have two dri interface:
/dev/dri/card0
/dev/dri/card1

I am not very familiar with Linux Graphics/Display subsystem, so I am looking for some help here.

My requirement is that I have to turn off HDMI display screen using a command line utility or a test program.
I learnt that for X-server we can use xset : xset dpms force off (and it works on my ubuntu desktop with 16.04).

However this command does not exists on my board.
So, my question is:
Is there any equivalent DPMS commands for Wayland/Wetson?

---------
Further, in order to explore more, I cloned libdrm code from here:
url = https://gitlab.freedesktop.org/mesa/drm

Then I found some test utility under: drm/tests folder.
After exploring more, and few modification, somehow I could able to cross-compile "proptest" for my board using below:
arm-linux-gnueabi-gcc -o proptest.out proptest.c -I./target/libdrm_include/ -L./target/libdrm_lib/ -ldrm

I found that "/dev/dri/card0" is not working with this test.
So, I changed the test utility like this:
fd = drmOpen("imx-drm", NULL);
OR
fd = open("/dev/dri/card1", O_RDWR);

When I default run it on my board, I see that "Connector_id: 29" is showing for the HDMI display and it can support DPMS property.
{{{
Connector 29 (11-1)
        1 EDID:
                flags: immutable blob
                blobs:

                value:
                     XXXXXXX
        2 DPMS:
                flags: enum
                enums: On=0 Standby=1 Suspend=2 Off=3
                value: 0
CRTC 24
CRTC 27
}}}

Then, when I try to run it using below command:
# ./proptest.out 29 connector 2 3

The program just returns successfully without any errors, but nothing happens. The display does not turns off.
I saw that in my kernel 3.10 the ioctl(DRM_IOCTL_MODE_SETPROPERTY) is already supported under DRM.

So, I am wondering what is the right way to verify DPMS mode property on wayland ?

If anybody have any suggestions, please help me.


Thanks,
Pintu

Labels (4)
5 Replies

2,288 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

ok

0 Kudos

2,288 Views
pintukumar
Contributor II

Ok, now I could able to change it both from user space and kernel space.

Thanks

0 Kudos

2,288 Views
shivanipatel
Senior Contributor II

Hi, PINTU KUMAR

How you have setup the Wayland based display system on i.MX6 board, can you please share the steps?

Can you please share how you are able to change DPMS mode for Wayland based display system?

Regards,

Shivani

0 Kudos

2,288 Views
pintukumar
Contributor II

Hi,

  • Wayland setup I haven't done it so I don't know about it.

However its weston based display. You need to install and launch weston

including the corresponding drm library and the weston ini file

  • Regarding DPMS mode, I used the "proptest" utility (part of libdrm/tests)

to verify DPMS mode.

  • To change dpms mode, we need to kill weston [but we will not be able

to see the display]

  • You can check the changes from:

  • cat /sys/class/drm/card/card1-/dpms

  • But during weston boot the dpms mode will be automatically changed again

by the kernel.

  • I just want to see if DPMS modes are changing correctly or not. So my

purpose is done.

Thanks,

Pintu

On Fri, May 31, 2019 at 6:01 PM shivanipatel <admin@community.nxp.com>

2,288 Views
shivanipatel
Senior Contributor II

Thanks, PINTU KUMAR‌ for the information.

0 Kudos