1
0
Fork 0

backends/native: Store min/max value for KMS signed range properties

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2861>
This commit is contained in:
Sebastian Wick 2023-02-17 22:44:27 +01:00 committed by Marge Bot
parent e0634a4060
commit 80dd26428b
2 changed files with 17 additions and 0 deletions

View file

@ -713,6 +713,20 @@ meta_kms_impl_device_update_prop_table (MetaKmsImplDevice *impl_device,
}
}
if (prop->type == DRM_MODE_PROP_SIGNED_RANGE)
{
if (drm_prop->count_values == 2)
{
prop->range_min_signed = (int64_t) drm_prop->values[0];
prop->range_max_signed = (int64_t) drm_prop->values[1];
}
else
{
g_warning ("DRM property '%s' is a signed range with %d values, ignoring",
drm_prop->name, drm_prop->count_values);
}
}
drmModeFreeProperty (drm_prop);
}
}

View file

@ -67,6 +67,9 @@ struct _MetaKmsProp
uint64_t range_min;
uint64_t range_max;
int64_t range_min_signed;
int64_t range_max_signed;
uint32_t prop_id;
uint64_t value;
};