mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
kms/crtc: Determine gamma support given the gamma length
The property doesn't necessarily exist when using drivers that doesn't
support atomic mode setting, and the way it worked will break night
light and other gamma related features. This makes things use the gamma
length; if it is higher than 0, it definitely supports it one way or the
other, i.e. GAMMA_LUT with the atomic backend, and drmModeCrtcSetGamma()
with the legacy/simple backend.
Fixes: 364572b95c
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2287
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2435>
This commit is contained in:
parent
9001fa9717
commit
a2ebd10f04
@ -96,7 +96,7 @@ meta_kms_crtc_is_active (MetaKmsCrtc *crtc)
|
|||||||
gboolean
|
gboolean
|
||||||
meta_kms_crtc_has_gamma (MetaKmsCrtc *crtc)
|
meta_kms_crtc_has_gamma (MetaKmsCrtc *crtc)
|
||||||
{
|
{
|
||||||
return !!meta_kms_crtc_get_prop_id (crtc, META_KMS_CRTC_PROP_GAMMA_LUT);
|
return crtc->current_state.gamma.size > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user