diff --git a/src/backends/native/meta-kms-impl-device.c b/src/backends/native/meta-kms-impl-device.c index dc2ac31ef..b1dd321a7 100644 --- a/src/backends/native/meta-kms-impl-device.c +++ b/src/backends/native/meta-kms-impl-device.c @@ -690,6 +690,20 @@ meta_kms_impl_device_update_prop_table (MetaKmsImplDevice *impl_device, update_prop_value (prop, prop_value); + if (prop->type == DRM_MODE_PROP_RANGE) + { + if (drm_prop->count_values == 2) + { + prop->range_min = drm_prop->values[0]; + prop->range_max = drm_prop->values[1]; + } + else + { + g_warning ("DRM property '%s' is a range with %d values, ignoring", + drm_prop->name, drm_prop->count_values); + } + } + drmModeFreeProperty (drm_prop); } } diff --git a/src/backends/native/meta-kms-impl-device.h b/src/backends/native/meta-kms-impl-device.h index c5ac131cc..a45d24bed 100644 --- a/src/backends/native/meta-kms-impl-device.h +++ b/src/backends/native/meta-kms-impl-device.h @@ -64,6 +64,9 @@ struct _MetaKmsProp MetaKmsEnum *enum_values; uint64_t default_value; + uint64_t range_min; + uint64_t range_max; + uint32_t prop_id; uint64_t value; };