drm: restore hdr metadata after vt switch (#163)

This commit is contained in:
UjinT34 2025-03-29 19:25:29 +03:00 committed by GitHub
parent 484b732195
commit 1d2dbd72c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -378,16 +378,18 @@ void Aquamarine::CDRMBackend::restoreAfterVT() {
if (!c->crtc || !c->output) if (!c->crtc || !c->output)
continue; continue;
auto& STATE = c->output->state->state();
SDRMConnectorCommitData data = { SDRMConnectorCommitData data = {
.mainFB = nullptr, .mainFB = nullptr,
.modeset = true, .modeset = true,
.blocking = true, .blocking = true,
.flags = 0, .flags = 0,
.test = false, .test = false,
.hdrMetadata = STATE.hdrMetadata,
}; };
auto& STATE = c->output->state->state(); auto& MODE = STATE.customMode ? STATE.customMode : STATE.mode;
auto& MODE = STATE.customMode ? STATE.customMode : STATE.mode;
if (!MODE) { if (!MODE) {
backend->log(AQ_LOG_WARNING, "drm: Connector {} has output but state has no mode, will send a reset state event later."); backend->log(AQ_LOG_WARNING, "drm: Connector {} has output but state has no mode, will send a reset state event later.");