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:
parent
58e5a5c9f7
commit
3fb14035cd
1 changed files with 5 additions and 3 deletions
|
@ -86,9 +86,11 @@ void DrmCrtc::setNext(const QSharedPointer<DrmBuffer> &buffer)
|
|||
|
||||
int DrmCrtc::gammaRampSize() const
|
||||
{
|
||||
// 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();
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue