aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-12-11 17:51:36 +0100
committerSimon Zeni <simon@bl4ckb0ne.ca>2023-12-12 14:42:52 +0000
commitd8c0707e2700aaaa0b09b4d9db1ab968181e625a (patch)
tree0cb02d9224ff2422c1fb4aad6fb13043c5ea2a61 /backend
parent3475b1880f360203995f226e8a7a6a56d5ca1052 (diff)
backend/drm: return secondary backend DRM FD
It can be useful for compositors to get the real DRM FD instead of the one from the parent compositor. For instance, some compositors might want to perform some DRM IOCTLs there to check the driver name, fetch some DRM resources, etc. This will also be a requirement for direct scanout on secondary GPUs.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/backend.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index c50e278b..655a1856 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -73,12 +73,7 @@ static void backend_destroy(struct wlr_backend *backend) {
static int backend_get_drm_fd(struct wlr_backend *backend) {
struct wlr_drm_backend *drm = get_drm_backend_from_backend(backend);
-
- if (drm->parent) {
- return drm->parent->fd;
- } else {
- return drm->fd;
- }
+ return drm->fd;
}
static uint32_t drm_backend_get_buffer_caps(struct wlr_backend *backend) {