backends/drm: fix gamma ramps with legacy
With legacy, gamma ramps wouldn't be calculated from the color transformation, which made them not be applied. BUG: 453070
This commit is contained in:
parent
74aff4b088
commit
b5aebc83ee
1 changed files with 1 additions and 4 deletions
|
@ -175,10 +175,6 @@ bool DrmPipeline::populateAtomicValues(drmModeAtomicReq *req, uint32_t &flags)
|
|||
}
|
||||
if (m_pending.crtc) {
|
||||
m_pending.crtc->setPending(DrmCrtc::PropertyIndex::VrrEnabled, m_pending.syncMode == RenderLoopPrivate::SyncMode::Adaptive);
|
||||
const auto currentTransformation = m_pending.gamma ? m_pending.gamma->lut().transformation() : nullptr;
|
||||
if (m_pending.colorTransformation != currentTransformation) {
|
||||
m_pending.gamma = QSharedPointer<DrmGammaRamp>::create(m_pending.crtc, m_pending.colorTransformation);
|
||||
}
|
||||
m_pending.crtc->setPending(DrmCrtc::PropertyIndex::Gamma_LUT, m_pending.gamma ? m_pending.gamma->blobId() : 0);
|
||||
const auto modeSize = m_pending.mode->size();
|
||||
const auto buffer = m_pending.layer->currentBuffer().data();
|
||||
|
@ -675,5 +671,6 @@ void DrmPipeline::setRgbRange(Output::RgbRange range)
|
|||
void DrmPipeline::setColorTransformation(const QSharedPointer<ColorTransformation> &transformation)
|
||||
{
|
||||
m_pending.colorTransformation = transformation;
|
||||
m_pending.gamma = QSharedPointer<DrmGammaRamp>::create(m_pending.crtc, transformation);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue