From 9e98f497af38852bdfffa93aa3fe014f6c6a72e4 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sat, 16 Jan 2021 22:31:53 +0100 Subject: backend/drm: use local DRM FD for wlr_rend The new wlr_renderer_autocreate API is great for compositors, however it causes some issues with DRM multi-GPU support. A DRM child backend wants the compositor to use the parent GPU, so it exposes the parent's DRM FD in get_drm_fd. However, in order to be able to perform multi-GPU buffer copies, the child DRM backend still needs to create a local renderer. Use the new private wlr_renderer_autocreate_with_drm_fd function to avoid creating a renderer for the parent GPU. Fixes: e128e6c08dc0 ("render: drop egl parameters from wlr_renderer_autocreate") --- backend/drm/renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend') diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c index ec9975c5..d3b2c8b7 100644 --- a/backend/drm/renderer.c +++ b/backend/drm/renderer.c @@ -28,7 +28,7 @@ bool init_drm_renderer(struct wlr_drm_backend *drm, return false; } - renderer->wlr_rend = wlr_renderer_autocreate(&drm->backend); + renderer->wlr_rend = wlr_renderer_autocreate_with_drm_fd(drm->fd); if (!renderer->wlr_rend) { wlr_log(WLR_ERROR, "Failed to create EGL/WLR renderer"); goto error_gbm; -- cgit v1.2.3