backends/drm: leave it up to testPendingConfiguration to create output layers

Doing it when querying outputs ties said querying to having created the renderer first
wilder/Plasma/6.3
Xaver Hugl 1 year ago
parent ea58bb8b1f
commit 44bd54e058
  1. 6
      src/backends/drm/drm_gpu.cpp

@ -306,7 +306,6 @@ bool DrmGpu::updateOutputs()
m_drmOutputs << output;
addedOutputs << output;
Q_EMIT outputAdded(output);
pipeline->setLayers(m_platform->renderBackend()->createDrmPlaneLayer(pipeline, DrmPlane::TypeIndex::Primary), m_platform->renderBackend()->createDrmPlaneLayer(pipeline, DrmPlane::TypeIndex::Cursor));
pipeline->setActive(true);
pipeline->setEnable(false);
pipeline->setMode(conn->modes().front());
@ -416,6 +415,11 @@ DrmPipeline::Error DrmGpu::testPendingConfiguration()
return c1->crtcId.value() > c2->crtcId.value();
});
}
for (DrmPipeline *pipeline : m_pipelines) {
if (!pipeline->primaryLayer()) {
pipeline->setLayers(m_platform->renderBackend()->createDrmPlaneLayer(pipeline, DrmPlane::TypeIndex::Primary), m_platform->renderBackend()->createDrmPlaneLayer(pipeline, DrmPlane::TypeIndex::Cursor));
}
}
// reset all outputs to their most basic configuration (primary plane without scaling)
// for the test, and set the target rects appropriately
for (const auto output : std::as_const(m_drmOutputs)) {

Loading…
Cancel
Save