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:
parent
e0634a4060
commit
80dd26428b
@ -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);
|
drmModeFreeProperty (drm_prop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,9 @@ struct _MetaKmsProp
|
|||||||
uint64_t range_min;
|
uint64_t range_min;
|
||||||
uint64_t range_max;
|
uint64_t range_max;
|
||||||
|
|
||||||
|
int64_t range_min_signed;
|
||||||
|
int64_t range_max_signed;
|
||||||
|
|
||||||
uint32_t prop_id;
|
uint32_t prop_id;
|
||||||
uint64_t value;
|
uint64_t value;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user