platforms/drm: fix crash with multi-gpu
This commit is contained in:
parent
fbdcdaf125
commit
18f857b1f3
1 changed files with 3 additions and 3 deletions
|
@ -272,13 +272,13 @@ int EglGbmBackend::getDmabufForSecondaryGpuOutput(AbstractOutput *output, uint32
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
it->secondaryBuffer = QSharedPointer<GbmBuffer>::create(it->gbmSurface);
|
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) {
|
if (fd == -1) {
|
||||||
qCDebug(KWIN_DRM) << "failed to export gbm_bo as dma-buf!";
|
qCDebug(KWIN_DRM) << "failed to export gbm_bo as dma-buf!";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
*format = gbm_bo_get_format(it->buffer->getBo());
|
*format = gbm_bo_get_format(it->secondaryBuffer->getBo());
|
||||||
*stride = gbm_bo_get_stride(it->buffer->getBo());
|
*stride = gbm_bo_get_stride(it->secondaryBuffer->getBo());
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue