Commit 18f857b1 authored by Xaver Hugl's avatar Xaver Hugl
Browse files

platforms/drm: fix crash with multi-gpu

parent fbdcdaf1
......@@ -272,13 +272,13 @@ int EglGbmBackend::getDmabufForSecondaryGpuOutput(AbstractOutput *output, uint32
return -1;
}
it->secondaryBuffer = QSharedPointer<GbmBuffer>::create(it->gbmSurface);
int fd = gbm_bo_get_fd(it->buffer->getBo());
int fd = gbm_bo_get_fd(it->secondaryBuffer->getBo());
if (fd == -1) {
qCDebug(KWIN_DRM) << "failed to export gbm_bo as dma-buf!";
return -1;
}
*format = gbm_bo_get_format(it->buffer->getBo());
*stride = gbm_bo_get_stride(it->buffer->getBo());
*format = gbm_bo_get_format(it->secondaryBuffer->getBo());
*stride = gbm_bo_get_stride(it->secondaryBuffer->getBo());
return fd;
}
......
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