Weston: Single CRTC cloning on multiple connectors. How?

Pekka Paalanen ppaalanen at gmail.com
Fri Mar 19 14:48:21 UTC 2021


On Fri, 19 Mar 2021 12:40:33 +0000
"Sebert, Holger.ext" <Holger.Sebert.ext at karlstorz.com> wrote:

> Hi,
> 
> I hope this is the right place to ask my question, if not, please
> point me into the right direction. Googling around did not bring
> any useful results. --
> 
> I am using Weston 9.0.0 and would like to duplicate monitor output
> on various connectors (HDMI, DisplayPort, etc.), i.e. use clone-mode.
> 
> I tried the "same-as" parameter in the "output"-section of my
> weston.ini file, but it did not have the desired effect. The relevant
> sections of my weston.ini look like follows:
> 
> 	[core]
> 	backend=drm-backend.so
> 
> 	...
> 
> 	[output]
> 	name=HDMI-A-1
> 	mode=1920x1080
> 
> 	[output]
> 	name=DP-1
> 	same-as=HDMI-A-1
> 
> 	[output]
> 	name=DP-2
> 	same-as=HDMI-A-1
> 
> The connector names are those which I found in "/sys/class/drm".
> There is exactly one graphics card in my machine ("card0").
> 
> Interestingly, setting the resolution to something different than
> "1920x1080" works. So Weston does indeed recognize these entries.
> However, it does not clone the display.
> 
> How do I activate display cloning in weston.ini?

Hi,

it looks like you are doing the right thing with weston.ini. I'm
guessing that your hardware does not support what you want though.
Support for shared CRTC clone mode in hardware is rare and might be
limited to just two very particular connectors.

Try this tool:
https://github.com/ascent12/drm_info

It prints a lot of information about what the kernel DRM driver exposes
of the hardware. It also shows which cloning scenarios should be
possible, but requires some deciphering.

For each "Connector", there is a list "Encoders". The list contains the
indices of the encoders that are possible to use with the connector.

For each "Encoder" you have "Clones" which is a list of encoders that
can be clones of each other when driven by the same CRTC. The problem
is that usually this list has only the encoder itself and no other,
meaning that shared-CRTC cloning is not possible. Additionally,
encoders have "CRTCS" which is a list of CRTCs that could be used with
this encoder.

For normal output the pipeline is:
CRTC -> encoder -> connector

With cloning, the pipeline would be:
CRTC --> encoder 1 -> connector A
     '-> encoder 2 -> connector B

If you can find two encoders that each list each other in their clones,
that's encouraging. Then figure out which connectors could be used with
these encoders. Then configure Weston to clone those connectors and
hope it works. It may help to start experimenting with just two
connectors, and keep everything else off until that works.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20210319/adf35658/attachment.sig>


More information about the wayland-devel mailing list