mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-04 20:55:58 +01: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
1 changed files with 1 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue