Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

DRM output cloning #878

Open
ascent12 opened this issue Apr 20, 2018 · 0 comments
Open

DRM output cloning #878

ascent12 opened this issue Apr 20, 2018 · 0 comments

Comments

@ascent12
Copy link
Member

ascent12 commented Apr 20, 2018

I've just been looking over some of the patches for Weston, and I've seen some recent work they've been doing on what they call their "Head-based output configuration".

As far as I understand it, it's a separation between DRM connectors and logicals output, which would allow for cloning. Instead of having a wlr_output per connector, we have a logical output which we attach multiple DRM connectors to, allowing them to share modesetting resources.
It could be generalised to other backends, but DRM is the place that it's actually useful.

Advantages over "software" cloning

  • Only 1 CRTC is used, meaning that it's freed up for another non-cloned monitor
  • You only have to draw stuff once

I'm not sure if we'd actually want to expose the gory details of this outside the backends or not.

void wlr_output_same_as(struct wlr_output *child, struct wlr_output *parent);

vs a more explicit

struct wlr_head *head = wlr_head_create();
wlr_head_add_output(head, wlr_output_1);
wlr_head_add_output(head, wlr_output_2);

The first solution's API is simpler, but raises questions about who gets events and owns resources, and what happens when the parent is unplugged without the child.

Obviously this could end up being a pretty massive API change, so would be for wlroots 2.0.
I'm not really suggesting that this is exactly how it should be done; I'm just throwing out some ideas. I feel I'm going to need to revamp a good chunk of DRM code for wlroots 2.0 anyway, which would be the best time to make these kinds of changes.

It may also help to make things like #560 possible.


wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:

https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/878

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant