[PATCH v3 2/3] tests/kms_vrr: Increase readability of kms_vrr
Naladala, Ramanaidu
Ramanaidu.naladala at intel.com
Wed Apr 9 10:47:01 UTC 2025
Hi Mitul,
On 4/3/2025 10:44 AM, Mitul Golani wrote:
> Add converted refresh rate value apart from nanosecond time prints
> to increase readability of debug logs.
>
> Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani at 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 83f326a4d..20cd9f0ae 100644
> --- a/tests/kms_vrr.c
> +++ b/tests/kms_vrr.c
> @@ -487,8 +487,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. */
> @@ -513,8 +515,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
LGTM,
Reviewed-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
More information about the Intel-gfx-trybot
mailing list