mirror of
https://github.com/brl/mutter.git
synced 2025-05-02 06:39:38 +00:00
kms-impl-device: Remember the min/max values for a DRM_MODE_PROP_RANGE
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2412>
This commit is contained in:
parent
64a67aa00b
commit
f760b47a3c
@ -690,6 +690,20 @@ meta_kms_impl_device_update_prop_table (MetaKmsImplDevice *impl_device,
|
|||||||
|
|
||||||
update_prop_value (prop, prop_value);
|
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);
|
drmModeFreeProperty (drm_prop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,9 @@ struct _MetaKmsProp
|
|||||||
MetaKmsEnum *enum_values;
|
MetaKmsEnum *enum_values;
|
||||||
uint64_t default_value;
|
uint64_t default_value;
|
||||||
|
|
||||||
|
uint64_t range_min;
|
||||||
|
uint64_t range_max;
|
||||||
|
|
||||||
uint32_t prop_id;
|
uint32_t prop_id;
|
||||||
uint64_t value;
|
uint64_t value;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user