You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Compositor: Only set the modifiers of the used planes
* Compositor: Extend docs with how to enable debug in the gpu driver
* Compositor: tweaked the tracing a bit
* Compositor: replaced (f)printf by tracing
* Update GBM.cpp
---------
Co-authored-by: Pierre Wielders <pierre@wielders.net>
if (modifierSupported && buffer->Modifier() != DRM_FORMAT_MOD_INVALID) {
455
+
int ret = drmModeAddFB2WithModifiers(cardFd, buffer->Width(), buffer->Height(),
456
+
buffer->Format(), handles.data(), pitches.data(),
457
+
offsets.data(), modifiers.data(), &framebufferId,
458
+
DRM_MODE_FB_MODIFIERS);
459
+
460
+
if (ret != 0) {
461
+
TRACE_GLOBAL(Trace::Warning, ("Failed to allocate drm framebuffer with modifiers (error: %d, %s), falling back to drmModeAddFB2", ret, strerror(errno)));
462
+
framebufferId = 0; // Reset in case it was partially set
463
+
} else {
464
+
TRACE_GLOBAL(Trace::Information, ("Successfully created framebuffer with modifiers"));
465
+
CloseDrmHandles(cardFd, handles);
466
+
return framebufferId;
460
467
}
468
+
}
469
+
470
+
if (buffer->Modifier() != DRM_FORMAT_MOD_INVALID && buffer->Modifier() != DRM_FORMAT_MOD_LINEAR) {
471
+
TRACE_GLOBAL(Trace::Warning, ("Cannot import drm framebuffer with explicit modifier 0x%" PRIX64 " without modifier support, trying anyway", buffer->Modifier()));
472
+
}
461
473
462
-
int ret = drmModeAddFB2(cardFd, buffer->Width(), buffer->Height(), buffer->Format(), handles.data(), pitches.data(), offsets.data(), &framebufferId, 0);
474
+
int ret = drmModeAddFB2(cardFd, buffer->Width(), buffer->Height(), buffer->Format(), handles.data(), pitches.data(), offsets.data(), &framebufferId, 0);
0 commit comments