wlroots icon indicating copy to clipboard operation
wlroots copied to clipboard

DRM output cloning

Open ascent12 opened this issue 6 years ago • 0 comments

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

ascent12 avatar Apr 20 '18 04:04 ascent12