mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-23 23:52:22 +00:00
backend/drm: Set timeline support based on capability
We assumed that all atomic backends supported syncobj, but gud does not. Instead, query DRM_CAP_SYNCOBJ_TIMELINE when using the atomic backend.
This commit is contained in:
parent
c0945b6613
commit
014023c14f
@ -271,7 +271,6 @@ struct wlr_backend *wlr_drm_backend_create(struct wlr_session *session,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
drm->backend.features.timeline = drm->iface != &legacy_iface;
|
|
||||||
if (drm->parent) {
|
if (drm->parent) {
|
||||||
drm->backend.features.timeline = drm->backend.features.timeline &&
|
drm->backend.features.timeline = drm->backend.features.timeline &&
|
||||||
drm->mgpu_renderer.wlr_rend->features.timeline;
|
drm->mgpu_renderer.wlr_rend->features.timeline;
|
||||||
|
@ -124,6 +124,7 @@ bool check_drm_features(struct wlr_drm_backend *drm) {
|
|||||||
drm->supports_tearing_page_flips = drmGetCap(drm->fd, DRM_CAP_ASYNC_PAGE_FLIP, &cap) == 0 && cap == 1;
|
drm->supports_tearing_page_flips = drmGetCap(drm->fd, DRM_CAP_ASYNC_PAGE_FLIP, &cap) == 0 && cap == 1;
|
||||||
} else {
|
} else {
|
||||||
drm->supports_tearing_page_flips = drmGetCap(drm->fd, DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP, &cap) == 0 && cap == 1;
|
drm->supports_tearing_page_flips = drmGetCap(drm->fd, DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP, &cap) == 0 && cap == 1;
|
||||||
|
drm->backend.features.timeline = drmGetCap(drm->fd, DRM_CAP_SYNCOBJ_TIMELINE, &cap) == 0 && cap == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (env_parse_bool("WLR_DRM_NO_MODIFIERS")) {
|
if (env_parse_bool("WLR_DRM_NO_MODIFIERS")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user