backends/drm: only use atomic gamma size with AMS

For some reason the property exists with legacy, too. If you try to set
legacy gamma with atomic gamma size it'll fail
This commit is contained in:
Xaver Hugl 2021-12-11 23:43:32 +01:00
parent 58e5a5c9f7
commit 3fb14035cd

View file

@ -86,10 +86,12 @@ void DrmCrtc::setNext(const QSharedPointer<DrmBuffer> &buffer)
int DrmCrtc::gammaRampSize() const
{
if (gpu()->atomicModeSetting()) {
// limit atomic gamma ramp to 4096 to work around https://gitlab.freedesktop.org/drm/intel/-/issues/3916
if (auto prop = getProp(PropertyIndex::Gamma_LUT_Size); prop && prop->current() <= 4096) {
return prop->current();
}
}
return m_crtc->gamma_size;
}