platforms/drm: only print error for direct scanout when useful

Most wayland-native apps provide buffers that aren't suitable
for direct scanout; the message usually only spams the log full
without proper reason or useful information
icc-effect-5.26.4
Xaver Hugl 2021-04-24 19:46:34 +02:00
parent af6f95b2eb
commit 40eb0e4f0e
1 changed files with 3 additions and 1 deletions

View File

@ -726,7 +726,9 @@ bool EglGbmBackend::scanout(int screenId, SurfaceItem *surfaceItem)
importedBuffer = gbm_bo_import(m_gpu->gbmDevice(), GBM_BO_IMPORT_FD, &data, GBM_BO_USE_SCANOUT);
}
if (!importedBuffer) {
qCDebug(KWIN_DRM) << "importing the dmabuf for direct scanout failed:" << strerror(errno);
if (errno != EINVAL) {
qCWarning(KWIN_DRM) << "Importing buffer for direct scanout failed!" << strerror(errno);
}
return false;
}
// damage tracking for screen casting