platforms/drm: always populate atomic req with connector props

If we don't then overscan and underscan are never applied
This commit is contained in:
Xaver Hugl 2021-07-07 19:16:29 +02:00
parent 4d8ae93f06
commit caa8c8fd45
2 changed files with 9 additions and 9 deletions

View file

@ -798,14 +798,16 @@ bool DrmOutput::doAtomicCommit(AtomicCommitMode mode)
return false;
}
}
if (!atomicReqModesetPopulate(req, m_dpmsModePending == DpmsMode::On)){
qCWarning(KWIN_DRM) << "Failed to populate Atomic Modeset";
errorHandler();
return false;
}
setModesetValues(m_dpmsModePending == DpmsMode::On);
flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
}
if (!m_conn->atomicPopulate(req)) {
qCWarning(KWIN_DRM) << "Failed to populate connector. Abort atomic commit!";
errorHandler();
return false;
}
if (!m_crtc->atomicPopulate(req)) {
qCWarning(KWIN_DRM) << "Failed to populate crtc. Abort atomic commit!";
errorHandler();
@ -859,7 +861,7 @@ bool DrmOutput::doAtomicCommit(AtomicCommitMode mode)
return true;
}
bool DrmOutput::atomicReqModesetPopulate(drmModeAtomicReq *req, bool enable)
void DrmOutput::setModesetValues(bool enable)
{
if (enable) {
const QSize mSize = modeSize();
@ -898,8 +900,6 @@ bool DrmOutput::atomicReqModesetPopulate(drmModeAtomicReq *req, bool enable)
m_conn->setValue(DrmConnector::PropertyIndex::CrtcId, enable ? m_crtc->id() : 0);
m_crtc->setValue(DrmCrtc::PropertyIndex::ModeId, enable ? m_blobId : 0);
m_crtc->setValue(DrmCrtc::PropertyIndex::Active, enable);
return m_conn->atomicPopulate(req);
}
int DrmOutput::gammaRampSize() const

View file

@ -118,7 +118,7 @@ private:
void dpmsFinishOn();
void dpmsFinishOff();
bool atomicReqModesetPopulate(drmModeAtomicReq *req, bool enable);
void setModesetValues(bool enable);
void setDpmsMode(DpmsMode mode) override;
void updateMode(int modeIndex) override;
void updateMode(uint32_t width, uint32_t height, uint32_t refreshRate);