From: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, ramanaidu.naladala@intel.com
Subject: [PATCH v4 2/2] tests/kms_vrr: Increase readability of kms_vrr
Date: Thu, 17 Apr 2025 14:45:13 +0530 [thread overview]
Message-ID: <20250417091514.1794527-3-mitulkumar.ajitkumar.golani@intel.com> (raw)
In-Reply-To: <20250417091514.1794527-1-mitulkumar.ajitkumar.golani@intel.com>
Add converted refresh rate value apart from nanosecond time prints
to increase readability of debug logs.
Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
---
tests/kms_vrr.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index c9059c897..91e3c12a6 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -510,8 +510,10 @@ flip_and_measure(data_t *data, igt_output_t *output, enum pipe pipe,
calculate_tolerance(&threshold_hi[i], &threshold_lo[i], exp_rate_ns);
- igt_info("Requested rate[%d]: %"PRIu64" ns, Expected rate between: %"PRIu64" ns to %"PRIu64" ns\n",
- i, rates_ns[i], threshold_hi[i], threshold_lo[i]);
+ igt_info("Requested rate[%d]: %" PRIu64 " ns (%.2f Hz), Expected rate between: %" PRIu64 " ns (%.2f Hz) to %" PRIu64 " ns (%.2f Hz)\n",
+ i, rates_ns[i], (float)NSECS_PER_SEC / rates_ns[i], threshold_hi[i],
+ (float)NSECS_PER_SEC / threshold_hi[i], threshold_lo[i],
+ (float)NSECS_PER_SEC / threshold_lo[i]);
}
/* Align with the flip completion event to speed up convergence. */
@@ -536,8 +538,9 @@ flip_and_measure(data_t *data, igt_output_t *output, enum pipe pipe,
*/
event_ns = get_kernel_event_ns(data, DRM_EVENT_FLIP_COMPLETE);
- igt_debug("event_ns - last_event_ns: %"PRIu64"\n",
- (event_ns - last_event_ns));
+ igt_debug("event_ns - last_event_ns: %" PRIu64 " (%.2f Hz)\n",
+ event_ns - last_event_ns,
+ (float)NSECS_PER_SEC / (event_ns - last_event_ns));
/*
* Check if the difference between the two flip timestamps
--
2.48.1
prev parent reply other threads:[~2025-04-17 9:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 9:15 [PATCH v4 0/2] Bucketize refresh rate tolerance Mitul Golani
2025-04-17 9:15 ` [PATCH v4 1/2] tests/kms_vrr: " Mitul Golani
2025-04-17 10:05 ` Nautiyal, Ankit K
2025-04-17 9:15 ` Mitul Golani [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250417091514.1794527-3-mitulkumar.ajitkumar.golani@intel.com \
--to=mitulkumar.ajitkumar.golani@intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=ramanaidu.naladala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox