diff options
author | Stephan Hilb <stephan@ecshi.net> | 2021-04-08 22:21:50 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-04-10 10:49:55 +0200 |
commit | 9f012cac2fbc72bc4395b8c50e6ea18b93b3c164 (patch) | |
tree | 753fe262cc0b3d8ee2cc22af33db3e465d0519ea /backend | |
parent | d5105c42e34439cc6e1084bd8b04712b74e467c0 (diff) |
drm: check for PRIME support
PRIME support for buffer sharing has become mandatory since the renderer
rewrite. Make sure we check for the appropriate capabilities in backend,
allocator and renderer.
See also #2819.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/drm.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index cc6fccaa..032623fa 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -30,14 +30,13 @@ bool check_drm_features(struct wlr_drm_backend *drm) { uint64_t cap; - if (drm->parent) { - if (drmGetCap(drm->fd, DRM_CAP_PRIME, &cap) || - !(cap & DRM_PRIME_CAP_IMPORT)) { - wlr_log(WLR_ERROR, - "PRIME import not supported on secondary GPU"); - return false; - } + if (drmGetCap(drm->fd, DRM_CAP_PRIME, &cap) || + !(cap & DRM_PRIME_CAP_IMPORT)) { + wlr_log(WLR_ERROR, "PRIME import not supported"); + return false; + } + if (drm->parent) { if (drmGetCap(drm->parent->fd, DRM_CAP_PRIME, &cap) || !(cap & DRM_PRIME_CAP_EXPORT)) { wlr_log(WLR_ERROR, |