Commit adb46cbf authored by Xaver Hugl's avatar Xaver Hugl
Browse files

backends/drm: disable added outputs if finding a working setup fails

If the non-working outputs stay enabled, that may cause problems.
parent 255e9882
Pipeline #163125 passed with stage
in 15 minutes and 45 seconds
......@@ -250,6 +250,7 @@ bool DrmGpu::updateOutputs()
}
// check for added and removed connectors
QVector<DrmOutput *> addedOutputs;
QVector<DrmConnector *> removedConnectors = m_connectors;
for (int i = 0; i < resources->count_connectors; ++i) {
const uint32_t currentConnector = resources->connectors[i];
......@@ -284,6 +285,7 @@ bool DrmGpu::updateOutputs()
auto output = new DrmOutput(conn->pipeline());
m_drmOutputs << output;
m_outputs << output;
addedOutputs << output;
Q_EMIT outputAdded(output);
}
}
......@@ -332,6 +334,11 @@ bool DrmGpu::updateOutputs()
for (const auto &pipeline : qAsConst(m_pipelines)) {
pipeline->revertPendingChanges();
}
for (const auto &output : qAsConst(addedOutputs)) {
output->setEnabled(false);
output->pipeline()->pending.enabled = false;
output->pipeline()->applyPendingChanges();
}
}
m_leaseDevice->setDrmMaster(true);
return true;
......
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