mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
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.
This commit is contained in:
parent
d5105c42e3
commit
9f012cac2f
3 changed files with 18 additions and 7 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue