[igt-dev] [PATCH i-g-t 1/1] tests/i915/i915_pm_rc6_residency: Use correct type for power in rc6-fence
Gupta, Anshuman
anshuman.gupta at intel.com
Mon Jul 11 13:27:27 UTC 2022
> -----Original Message-----
> From: Tauro, Riana <riana.tauro at intel.com>
> Sent: Monday, July 11, 2022 2:22 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Tauro, Riana <riana.tauro at intel.com>; Gupta, Anshuman
> <anshuman.gupta at intel.com>
> Subject: [PATCH i-g-t 1/1] tests/i915/i915_pm_rc6_residency: Use correct type
> for power in rc6-fence
>
> Use the correct type in rc6-fence for power to prevent truncating value to 0.
>
> Signed-off-by: Riana Tauro <riana.tauro at intel.com>
LGTM.
Reviewed-by: Anshuman Gupta <anshuman.gupta at intel.com>
> ---
> tests/i915/i915_pm_rc6_residency.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/i915/i915_pm_rc6_residency.c
> b/tests/i915/i915_pm_rc6_residency.c
> index 67d25918..cf7a92b9 100644
> --- a/tests/i915/i915_pm_rc6_residency.c
> +++ b/tests/i915/i915_pm_rc6_residency.c
> @@ -509,7 +509,7 @@ static void rc6_fence(int i915, const intel_ctx_t *ctx)
> igt_debug("%s: slept=%lu perf=%"PRIu64", rc6=%"PRIu64"\n",
> e->name, slept, ts[1] - ts[0], rc6);
> if (rapl_read(&rapl, &sample[1])) {
> - uint64_t power = power_J(&rapl, &sample[0],
> &sample[1]);
> + double power = power_J(&rapl, &sample[0],
> &sample[1]);
> igt_info("Total energy used for %s: %.1fmJ
> (%.1fmW)\n",
> e->name,
> power * 1e3,
> --
> 2.25.1
More information about the igt-dev
mailing list