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

platforms/drm: always populate atomic req with connector props

If we don't then overscan and underscan are never applied


(cherry picked from commit caa8c8fd)
parent 4e81abfc
......@@ -794,14 +794,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();
......@@ -855,7 +857,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();
......@@ -894,8 +896,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
......
......@@ -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);
......
Markdown is supported
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