From b3e245b177780c9d50354ca41ee15281a36dd2ba Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 16 Sep 2021 12:37:44 +0200 Subject: [PATCH] platforms/drm: make SRC properties readable They're 16.16 fixed point. Should make debugging easier --- src/plugins/platforms/drm/drm_pipeline.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/drm/drm_pipeline.cpp b/src/plugins/platforms/drm/drm_pipeline.cpp index d0fa5adbaf..a96f8d2ee9 100644 --- a/src/plugins/platforms/drm/drm_pipeline.cpp +++ b/src/plugins/platforms/drm/drm_pipeline.cpp @@ -596,10 +596,12 @@ static void printProps(DrmObject *object) auto list = object->properties(); for (const auto &prop : list) { if (prop) { + uint64_t current = prop->name().startsWith("SRC_") ? prop->current() >> 16 : prop->current(); if (prop->isImmutable() || !prop->needsCommit()) { - qCWarning(KWIN_DRM).nospace() << "\t" << prop->name() << ": " << prop->current(); + qCWarning(KWIN_DRM).nospace() << "\t" << prop->name() << ": " << current; } else { - qCWarning(KWIN_DRM).nospace() << "\t" << prop->name() << ": " << prop->current() << "->" << prop->pending(); + uint64_t pending = prop->name().startsWith("SRC_") ? prop->pending() >> 16 : prop->pending(); + qCWarning(KWIN_DRM).nospace() << "\t" << prop->name() << ": " << current << "->" << pending; } } }