Introduce wlr_drm_lease_v1 #1730
Conversation
3030f87
to
77b74a7
Compare
|
Hi, Sorry to barge in, but any reason not posting the protocol on wayland-dev ML? I think there might be others which would like to take a look, and this shouldn't be (a) compositor specific protocol. |
|
I prefer to have a working implementation to demonstrate the protocol before I submit it for others to consider. Writing an implementation often turns up defects in the protocol, which I would rather hear about before it's standardized than after. |
|
Test client: https://git.sr.ht/~sircmpwn/kmscube Run |
|
This is basically ready for review. Known issues:
The DRM changes and lease manager implementation should be in good shape, though, and if you want to test it you can update the hardcoded output name to some other output for leasing. |
| @@ -649,6 +654,8 @@ static bool drm_connector_set_cursor(struct wlr_output *output, | |||
| enum wl_output_transform transform, | |||
| int32_t hotspot_x, int32_t hotspot_y, bool update_texture) { | |||
| struct wlr_drm_connector *conn = get_drm_connector_from_output(output); | |||
| assert((conn->state != WLR_DRM_CONN_LEASED || texture == NULL) | |||
| && "Use of leased connector is a programming error"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This texture == NULL exception is necessary because when the output is destroyed, its cursors are destroyed as well.
e6a886c
to
f49c3a4
Compare
ecab581
to
7bf72b4
Compare
ad7fd82
to
fc352aa
Compare
2aaa12b
to
d84eb9e
Compare
924f11b
to
69ada84
Compare
ab3e951
to
de14045
Compare
7e799d9
to
476963a
Compare
|
This doesn't seem to work for me at the moment. Here is a log from starting sway, running kmscube -l, and immediately closing sway. Sway config file: Here is a relevant snippet starting at line 1833:
System configuration info: I am using the following patches: |
|
No support whatsoever is provided for these patchsets, you'll have to investigate the problem yourself and send an updated patch. |
|
If anyone has an idea on where I should start hacking away here is where I am at: I am trying to get DRM leasing with SteamVR and a Valve Index working. Apparently SteamVR tries to identify the HMD output by the available output modes. Running xrandr with these patches applied gives a "non-desktop" XWAYLAND1 output with no modes. SteamVR then ignores that output and carries on until it realizes there's no display for it to use. I can manually add modes using the xrandr tool but that's not quite enough. SteamVR requires the "preferred mode" to be exactly 2880x1600. I have not yet found a way set which mode is preferred externally. Does anyone know if this is something that should be handled by wlroots or sway? Shouldn't wlroots pass the supported modes onto xwayland even if it's a non-desktop output? |
|
You need my Xwayland patches for this to work. |
|
This patch? I am running it already on master. |
|
@optlink I tried this out today with a similar setup (Valve Index, SteamVR, and in my case a Vega 64). I applied the xwayland patch to the xserver master branch, but for sway and wlroots I just built the drm-lease branches rather than apply them as patches to master. If I run xrandr I see |
|
@michaelnew The differences between our setups that I can see are:
I suspect the problem is with 3 since I do not fully understand the impact of the changes that were made for sway 1.5. |
|
I rebuilt sway and wlroots from their respective drm-lease branches and I get the exact same result. There must be something else wrong. Update: the kmscube demo works, though the eyes are swapped. The problem is with Xwayland then? |
|
It turns out that the Xwayland patches are broken on master currently. Building from the merge request branch works but you will need a fix for the GLX issue caused by recent changes to libglvnd: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1032 |
|
Superseded by #2929 |
Still deep in the trenches on this patch, but opening it in case anyone is curious or has early feedback.
Related ticket: #1723
Test client: https://git.sr.ht/~sircmpwn/kmscube (
./kmscube -l)I don't intend to merge this until this protocol makes it through review on
wayland-devel:https://lists.freedesktop.org/archives/wayland-devel/2019-June/040672.html