backends/drm: check activePending instead of active for when applying a new gamma ramp is allowed

The crtc may not be set yet in some cases

BUG: 471562
This commit is contained in:
Xaver Hugl 2023-09-12 16:23:15 +02:00
parent 08836ba471
commit 57fae99f33

View file

@ -382,7 +382,7 @@ DrmOutputLayer *DrmOutput::cursorLayer() const
bool DrmOutput::setGammaRamp(const std::shared_ptr<ColorTransformation> &transformation)
{
if (!m_pipeline->active() || needsColormanagement()) {
if (!m_pipeline->activePending() || needsColormanagement()) {
return false;
}
m_pipeline->setGammaRamp(transformation);
@ -404,7 +404,7 @@ bool DrmOutput::setChannelFactors(const QVector3D &rgb)
}
m_channelFactors = rgb;
if (needsColormanagement()) {
if (!m_pipeline->active()) {
if (!m_pipeline->activePending()) {
return false;
}
QMatrix3x3 ctm;