backends/drm: force a modeset after tty switches with legacy
We don't know what the current mode is, or if the display is even enabled or whatever. Always do a modeset to be sure everything is correct BUG: 469280
This commit is contained in:
parent
d3c82fa103
commit
ecc66a03d0
3 changed files with 12 additions and 0 deletions
|
@ -702,6 +702,12 @@ void DrmGpu::setActive(bool active)
|
||||||
}
|
}
|
||||||
// while the session was inactive, the output list may have changed
|
// while the session was inactive, the output list may have changed
|
||||||
m_platform->updateOutputs();
|
m_platform->updateOutputs();
|
||||||
|
for (const auto &output : std::as_const(m_drmOutputs)) {
|
||||||
|
// force a modeset with legacy, we can't reliably know if one is needed
|
||||||
|
if (!atomicModeSetting()) {
|
||||||
|
output->pipeline()->forceLegacyModeset();
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const auto &output : std::as_const(m_drmOutputs)) {
|
for (const auto &output : std::as_const(m_drmOutputs)) {
|
||||||
output->renderLoop()->inhibit();
|
output->renderLoop()->inhibit();
|
||||||
|
|
|
@ -72,6 +72,7 @@ public:
|
||||||
Error present();
|
Error present();
|
||||||
bool testScanout();
|
bool testScanout();
|
||||||
bool maybeModeset();
|
bool maybeModeset();
|
||||||
|
void forceLegacyModeset();
|
||||||
|
|
||||||
bool needsModeset() const;
|
bool needsModeset() const;
|
||||||
void applyPendingChanges();
|
void applyPendingChanges();
|
||||||
|
|
|
@ -43,6 +43,11 @@ DrmPipeline::Error DrmPipeline::presentLegacy()
|
||||||
return Error::None;
|
return Error::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DrmPipeline::forceLegacyModeset()
|
||||||
|
{
|
||||||
|
legacyModeset();
|
||||||
|
}
|
||||||
|
|
||||||
DrmPipeline::Error DrmPipeline::legacyModeset()
|
DrmPipeline::Error DrmPipeline::legacyModeset()
|
||||||
{
|
{
|
||||||
uint32_t connId = m_connector->id();
|
uint32_t connId = m_connector->id();
|
||||||
|
|
Loading…
Reference in a new issue