All of lore.kernel.org
 help / color / mirror / Atom feed
* dpms mode change with wayland on iMX.6
@ 2019-05-27  7:11 Pintu Agarwal
  2019-05-27 10:12 ` Pintu Agarwal
  2019-06-05 14:02 ` Pekka Paalanen
  0 siblings, 2 replies; 5+ messages in thread
From: Pintu Agarwal @ 2019-05-27  7:11 UTC (permalink / raw)
  To: dri-devel, paulo.r.zanoni

Dear All,

I have a iMX.6 (arm 32) board with Linux Kernel 3.10 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 turn off HDMI display screen using a
command line utility or test program.
I learn 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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dpms mode change with wayland on iMX.6
  2019-05-27  7:11 dpms mode change with wayland on iMX.6 Pintu Agarwal
@ 2019-05-27 10:12 ` Pintu Agarwal
  2019-05-27 13:53   ` Pintu Agarwal
  2019-06-05 14:02 ` Pekka Paalanen
  1 sibling, 1 reply; 5+ messages in thread
From: Pintu Agarwal @ 2019-05-27 10:12 UTC (permalink / raw)
  To: dri-devel, paulo.r.zanoni, etnaviv

On Mon, May 27, 2019 at 12:41 PM Pintu Agarwal <pintu.ping@gmail.com> wrote:
>
> Dear All,
>
> I have a iMX.6 (arm 32) board with Linux Kernel 3.10 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 turn off HDMI display screen using a
> command line utility or test program.
> I learn 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

+ etnaviv@lists.freedesktop.org
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dpms mode change with wayland on iMX.6
  2019-05-27 10:12 ` Pintu Agarwal
@ 2019-05-27 13:53   ` Pintu Agarwal
  2019-06-05 14:07     ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Pintu Agarwal @ 2019-05-27 13:53 UTC (permalink / raw)
  To: dri-devel, paulo.r.zanoni, etnaviv

On Mon, May 27, 2019 at 3:42 PM Pintu Agarwal <pintu.ping@gmail.com> wrote:
>
> On Mon, May 27, 2019 at 12:41 PM Pintu Agarwal <pintu.ping@gmail.com> wrote:
> >
> > Dear All,
> >
> > I have a iMX.6 (arm 32) board with Linux Kernel 3.10 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 turn off HDMI display screen using a
> > command line utility or test program.
> > I learn 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
>
> + etnaviv@lists.freedesktop.org


One more point:
Although it is having Kernel 3.10, but the DRM modules were upgraded
to Kernel 4.9.xx from mainline.
So, latest DRM changes are already applied.

Thanks,
Pintu
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dpms mode change with wayland on iMX.6
  2019-05-27  7:11 dpms mode change with wayland on iMX.6 Pintu Agarwal
  2019-05-27 10:12 ` Pintu Agarwal
@ 2019-06-05 14:02 ` Pekka Paalanen
  1 sibling, 0 replies; 5+ messages in thread
From: Pekka Paalanen @ 2019-06-05 14:02 UTC (permalink / raw)
  To: Pintu Agarwal; +Cc: paulo.r.zanoni, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 2077 bytes --]

On Mon, 27 May 2019 12:41:43 +0530
Pintu Agarwal <pintu.ping@gmail.com> wrote:

> Dear All,
> 
> I have a iMX.6 (arm 32) board with Linux Kernel 3.10 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 turn off HDMI display screen using a
> command line utility or test program.
> I learn 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?

Hi,

there is not. A proper solution is to teach the display server (e.g.
Weston) toggle DPMS according to the conditions you need. If DPMS must
be controlled from outside of the display server, you have to invent
the necessary protocol extension (Wayland, D-Bus, something else...)
yourself.

> 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 ?

You can probably read the property via DRM, but on DRM KMS there is no
way to set it unless you are the DRM master. The idea is that the
currently active display server is in control, and there is no way to
bypass it as long as it is active (is "DRM master").

Wayland is not a display server. Wayland is just an interface to some
display servers, and by design Wayland does not expose hardware knobs
like DPMS directly, unless you make your own Wayland extension for it.


Thanks,
pq

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dpms mode change with wayland on iMX.6
  2019-05-27 13:53   ` Pintu Agarwal
@ 2019-06-05 14:07     ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2019-06-05 14:07 UTC (permalink / raw)
  To: Pintu Agarwal; +Cc: paulo.r.zanoni, DRI mailing list, The etnaviv authors

On Mon, May 27, 2019 at 10:53 AM Pintu Agarwal <pintu.ping@gmail.com> wrote:

> One more point:
> Although it is having Kernel 3.10, but the DRM modules were upgraded
> to Kernel 4.9.xx from mainline.
> So, latest DRM changes are already applied.

Please don't do this: just use a recent mainline kernel instead of
mixing 3.10 kernel + DRM part from 4.9.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-05 14:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27  7:11 dpms mode change with wayland on iMX.6 Pintu Agarwal
2019-05-27 10:12 ` Pintu Agarwal
2019-05-27 13:53   ` Pintu Agarwal
2019-06-05 14:07     ` Fabio Estevam
2019-06-05 14:02 ` Pekka Paalanen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.