Commit 8d3de947 authored by Xaver Hugl's avatar Xaver Hugl
Browse files

backends/drm: re-create gamma ramps if necessary when switching crtcs

The gamma ramp size of different crtcs is not guaranteed to be the same,
so the gamma blob may need to be re-created
parent b5aebc83
Pipeline #170917 passed with stage
in 12 minutes and 37 seconds
......@@ -615,6 +615,9 @@ static const QMap<uint32_t, QVector<uint64_t>> legacyFormats = {{DRM_FORMAT_XRGB
void DrmPipeline::setCrtc(DrmCrtc *crtc)
if (crtc && m_pending.crtc && crtc->gammaRampSize() != m_pending.crtc->gammaRampSize() && m_pending.colorTransformation) {
m_pending.gamma = QSharedPointer<DrmGammaRamp>::create(crtc, m_pending.colorTransformation);
m_pending.crtc = crtc;
if (crtc) {
m_pending.formats = crtc->primaryPlane() ? crtc->primaryPlane()->formats() : legacyFormats;
Supports Markdown
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