mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-18 06:47:31 -04:00
linux_dmabuf_v1: drop split render/display workaround
This commit is contained in:
parent
f7fb398fcd
commit
52baa0bffb
1 changed files with 11 additions and 15 deletions
|
|
@ -883,24 +883,20 @@ static bool set_default_feedback(struct wlr_linux_dmabuf_v1 *linux_dmabuf,
|
||||||
goto error_compiled;
|
goto error_compiled;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *name = NULL;
|
if (!(device->available_nodes & (1 << DRM_NODE_RENDER))) {
|
||||||
if (device->available_nodes & (1 << DRM_NODE_RENDER)) {
|
wlr_log(WLR_DEBUG, "DRM device has no render node");
|
||||||
name = device->nodes[DRM_NODE_RENDER];
|
|
||||||
} else {
|
|
||||||
// Likely a split display/render setup
|
|
||||||
assert(device->available_nodes & (1 << DRM_NODE_PRIMARY));
|
|
||||||
name = device->nodes[DRM_NODE_PRIMARY];
|
|
||||||
wlr_log(WLR_DEBUG, "DRM device %s has no render node, "
|
|
||||||
"falling back to primary node", name);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main_device_fd = open(name, O_RDWR | O_CLOEXEC);
|
|
||||||
drmFreeDevice(&device);
|
|
||||||
if (main_device_fd < 0) {
|
|
||||||
wlr_log_errno(WLR_ERROR, "Failed to open DRM device %s", name);
|
|
||||||
goto error_compiled;
|
goto error_compiled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *name = device->nodes[DRM_NODE_RENDER];
|
||||||
|
int main_device_fd = open(name, O_RDWR | O_CLOEXEC);
|
||||||
|
if (main_device_fd < 0) {
|
||||||
|
wlr_log_errno(WLR_ERROR, "Failed to open DRM device %s", name);
|
||||||
|
drmFreeDevice(&device);
|
||||||
|
goto error_compiled;
|
||||||
|
}
|
||||||
|
drmFreeDevice(&device);
|
||||||
|
|
||||||
size_t tranches_len =
|
size_t tranches_len =
|
||||||
feedback->tranches.size / sizeof(struct wlr_linux_dmabuf_feedback_v1_tranche);
|
feedback->tranches.size / sizeof(struct wlr_linux_dmabuf_feedback_v1_tranche);
|
||||||
const struct wlr_linux_dmabuf_feedback_v1_tranche *tranches = feedback->tranches.data;
|
const struct wlr_linux_dmabuf_feedback_v1_tranche *tranches = feedback->tranches.data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue