Commit 34ce3dde authored by Xaver Hugl's avatar Xaver Hugl
Browse files

backends/drm: use GBM_BO_USE_SCANOUT when importing buffers for multi gpu

The gbm surface may not have the scanout use flag, and if the buffer is imported
without it, creating the framebuffer may fail

CCBUG: 454086
parent c61f0ad1
Pipeline #192071 passed with stage
in 12 minutes and 38 seconds
......@@ -273,7 +273,7 @@ std::shared_ptr<DrmFramebuffer> EglGbmLayerSurface::importBuffer()
std::shared_ptr<DrmFramebuffer> EglGbmLayerSurface::importDmabuf()
{
const auto imported = GbmBuffer::importBuffer(m_gpu, m_currentBuffer.get(), m_gbmSurface->flags());
const auto imported = GbmBuffer::importBuffer(m_gpu, m_currentBuffer.get(), m_gbmSurface->flags() | GBM_BO_USE_SCANOUT);
if (!imported) {
qCWarning(KWIN_DRM, "failed to import gbm_bo for multi-gpu usage: %s", strerror(errno));
return nullptr;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment