drm: always rescan connectors after rechecking crtcs

This commit is contained in:
Vaxry 2024-07-09 10:31:01 +02:00
parent 05995dd21e
commit bd6da3bec6

View file

@ -466,7 +466,7 @@ void Aquamarine::CDRMBackend::recheckCRTCs() {
} }
recheck.emplace_back(c); recheck.emplace_back(c);
backend->log(AQ_LOG_DEBUG, std::format("drm: connector {}, has crtc {}, will be rechecked", c->szName, c->crtc ? c->crtc->id : -1)); backend->log(AQ_LOG_DEBUG, std::format("drm: connector {}, has crtc {}, will be rechecked", c->szName, c->crtc ? (int)c->crtc->id : -1));
} }
for (size_t i = 0; i < crtcs.size(); ++i) { for (size_t i = 0; i < crtcs.size(); ++i) {
@ -497,7 +497,7 @@ void Aquamarine::CDRMBackend::recheckCRTCs() {
c->output->commit(); c->output->commit();
} }
backend->log(AQ_LOG_DEBUG, std::format("drm: slot {} crtc {} assigned to {} (old {})", i, crtcs.at(i)->id, c->szName, c->crtc ? c->crtc->id : -1)); backend->log(AQ_LOG_DEBUG, std::format("drm: slot {} crtc {} assigned to {} (old {})", i, crtcs.at(i)->id, c->szName, c->crtc ? (int)c->crtc->id : -1));
c->crtc = crtcs.at(i); c->crtc = crtcs.at(i);
assigned = true; assigned = true;
changed.emplace_back(c); changed.emplace_back(c);
@ -522,11 +522,9 @@ void Aquamarine::CDRMBackend::recheckCRTCs() {
c->output->events.state.emit(IOutput::SStateEvent{}); c->output->events.state.emit(IOutput::SStateEvent{});
} }
if (rescan) { backend->log(AQ_LOG_DEBUG, "drm: rescanning after realloc");
backend->log(AQ_LOG_DEBUG, "drm: rescan needed after realloc");
scanConnectors(); scanConnectors();
} }
}
bool Aquamarine::CDRMBackend::grabFormats() { bool Aquamarine::CDRMBackend::grabFormats() {
// FIXME: do this properly maybe? // FIXME: do this properly maybe?