[mutter/gnome-41] kms/crtc: Determine gamma support given the gamma length
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-41] kms/crtc: Determine gamma support given the gamma length
- Date: Thu, 2 Jun 2022 09:37:55 +0000 (UTC)
commit b7c5ce6d467000ff8257da052c53f86684cae704
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri May 27 18:19:27 2022 +0200
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: 364572b95c8354ac66674064a8058aa98bc0bbef
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2287
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2435>
(cherry picked from commit a2ebd10f049d888e451938e23a035ed97e0c8eff)
src/backends/native/meta-kms-crtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/backends/native/meta-kms-crtc.c b/src/backends/native/meta-kms-crtc.c
index 76e9cb3593..e6ec009bf6 100644
--- a/src/backends/native/meta-kms-crtc.c
+++ b/src/backends/native/meta-kms-crtc.c
@@ -96,7 +96,7 @@ meta_kms_crtc_is_active (MetaKmsCrtc *crtc)
gboolean
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]