Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Riana Tauro <riana.tauro@intel.com>
To: Ashutosh Dixit <ashutosh.dixit@intel.com>,
	<igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 2/2] i915/i915_power: Also show requested and actual freq's
Date: Thu, 23 Mar 2023 10:33:39 +0530	[thread overview]
Message-ID: <f64c1019-002e-e732-7767-32cd63ff99f2@intel.com> (raw)
In-Reply-To: <20230322230402.3342787-3-ashutosh.dixit@intel.com>



On 3/23/2023 4:34 AM, Ashutosh Dixit wrote:
> When power limits are in effect, in addition to measured power it is also
> important to see the requested and actual freq's and see how they change
> with set power limits. Add this to the test output.
> 
> v2: Display power for each gt (Riana)
> 
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Looks good to me
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> ---
>   tests/i915/i915_power.c | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/i915/i915_power.c b/tests/i915/i915_power.c
> index f2fd228698a..abf458573ef 100644
> --- a/tests/i915/i915_power.c
> +++ b/tests/i915/i915_power.c
> @@ -5,6 +5,7 @@
>   
>   #include "igt.h"
>   #include "i915/gem.h"
> +#include "igt_sysfs.h"
>   #include "igt_power.h"
>   
>   IGT_TEST_DESCRIPTION("i915 power measurement tests");
> @@ -27,6 +28,7 @@ static void sanity(int i915)
>   	double idle, busy;
>   	igt_spin_t *spin;
>   	uint64_t ahnd;
> +	int dir, gt, req, act;
>   
>   #define DURATION_SEC 2
>   
> @@ -34,6 +36,7 @@ static void sanity(int i915)
>   	igt_require(!igt_power_open(i915, &pwr, "gpu"));
>   	gem_quiescent_gpu(i915);
>   	idle = measure_power(&pwr, DURATION_SEC);
> +	igt_info("Measured idle power: %g mW\n", idle);
>   
>   	/* Busy power */
>   	ctx = intel_ctx_create_all_physical(i915);
> @@ -44,12 +47,17 @@ static void sanity(int i915)
>   	/* Wait till at least one spinner starts */
>   	igt_spin_busywait_until_started(spin);
>   	busy = measure_power(&pwr, DURATION_SEC);
> +	i915_for_each_gt(i915, gt, dir) {
> +		req = igt_sysfs_get_u32(dir, "rps_cur_freq_mhz");
> +		act = igt_sysfs_get_u32(dir, "rps_act_freq_mhz");
> +		igt_info("gt %d: req MHz: %d, act MHz: %d\n", gt, req, act);
> +	}
>   	igt_free_spins(i915);
>   	put_ahnd(ahnd);
>   	intel_ctx_destroy(i915, ctx);
>   	igt_power_close(&pwr);
>   
> -	igt_info("Measured power: idle: %g mW, busy: %g mW\n", idle, busy);
> +	igt_info("Measured busy power: %g mW\n", busy);
>   	igt_assert(idle >= 0 && busy > 0 && busy > idle);
>   }
>   

  reply	other threads:[~2023-03-23  5:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 23:04 [igt-dev] [PATCH i-g-t 0/2] i915/i915_power: Also show requested and actual freq's Ashutosh Dixit
2023-03-22 23:04 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_sysfs: Add i915_for_each_gt() macro Ashutosh Dixit
2023-03-23 13:28   ` Kamil Konieczny
2023-03-22 23:04 ` [igt-dev] [PATCH i-g-t 2/2] i915/i915_power: Also show requested and actual freq's Ashutosh Dixit
2023-03-23  5:03   ` Riana Tauro [this message]
2023-03-22 23:34 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/i915_power: Also show requested and actual freq's (rev2) Patchwork
2023-03-23  0:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-03-23 18:19 ` [igt-dev] [PATCH i-g-t 0/2] i915/i915_power: Also show requested and actual freq's Dixit, Ashutosh

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=f64c1019-002e-e732-7767-32cd63ff99f2@intel.com \
    --to=riana.tauro@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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