mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-21 14:42:25 +00:00
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.
This commit is contained in:
parent
3475b1880f
commit
d8c0707e27
@ -73,12 +73,7 @@ static void backend_destroy(struct wlr_backend *backend) {
|
|||||||
|
|
||||||
static int backend_get_drm_fd(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);
|
struct wlr_drm_backend *drm = get_drm_backend_from_backend(backend);
|
||||||
|
return drm->fd;
|
||||||
if (drm->parent) {
|
|
||||||
return drm->parent->fd;
|
|
||||||
} else {
|
|
||||||
return drm->fd;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t drm_backend_get_buffer_caps(struct wlr_backend *backend) {
|
static uint32_t drm_backend_get_buffer_caps(struct wlr_backend *backend) {
|
||||||
|
Loading…
Reference in New Issue
Block a user