[mutter] kms: Add fixed point formatting to MUTTER_DEBUG=kms printing
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] kms: Add fixed point formatting to MUTTER_DEBUG=kms printing
- Date: Tue, 13 Jul 2021 08:08:59 +0000 (UTC)
commit 9f492a0ee06e06db132ff45634abc277787977ed
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Tue Jul 13 15:26:08 2021 +0800
kms: Add fixed point formatting to MUTTER_DEBUG=kms printing
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1923>
src/backends/native/meta-kms-impl-device-atomic.c | 30 +++++++++++++++++------
1 file changed, 22 insertions(+), 8 deletions(-)
---
diff --git a/src/backends/native/meta-kms-impl-device-atomic.c
b/src/backends/native/meta-kms-impl-device-atomic.c
index 66246e87e8..8e41207ee1 100644
--- a/src/backends/native/meta-kms-impl-device-atomic.c
+++ b/src/backends/native/meta-kms-impl-device-atomic.c
@@ -348,14 +348,28 @@ add_plane_property (MetaKmsImplDevice *impl_device,
return FALSE;
}
- meta_topic (META_DEBUG_KMS,
- "[atomic] Setting plane %u (%s) property '%s' (%u) to %"
- G_GUINT64_FORMAT,
- meta_kms_plane_get_id (plane),
- meta_kms_impl_device_get_path (impl_device),
- meta_kms_plane_get_prop_name (plane, prop),
- meta_kms_plane_get_prop_id (plane, prop),
- value);
+ switch (meta_kms_plane_get_prop_internal_type (plane, prop))
+ {
+ case META_KMS_PROP_TYPE_RAW:
+ meta_topic (META_DEBUG_KMS,
+ "[atomic] Setting plane %u (%s) property '%s' (%u) to %"
+ G_GUINT64_FORMAT,
+ meta_kms_plane_get_id (plane),
+ meta_kms_impl_device_get_path (impl_device),
+ meta_kms_plane_get_prop_name (plane, prop),
+ meta_kms_plane_get_prop_id (plane, prop),
+ value);
+ break;
+ case META_KMS_PROP_TYPE_FIXED_16:
+ meta_topic (META_DEBUG_KMS,
+ "[atomic] Setting plane %u (%s) property '%s' (%u) to %.2f",
+ meta_kms_plane_get_id (plane),
+ meta_kms_impl_device_get_path (impl_device),
+ meta_kms_plane_get_prop_name (plane, prop),
+ meta_kms_plane_get_prop_id (plane, prop),
+ meta_fixed_16_to_double (value));
+ break;
+ }
ret = drmModeAtomicAddProperty (req,
meta_kms_plane_get_id (plane),
prop_id,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]