[Intel-gfx] [PATCH i-g-t] i915_pm_rps: Be wary if RP0 == RPn

Mika Kuoppala mika.kuoppala at linux.intel.com
Mon Jan 27 09:54:25 UTC 2020


Chris Wilson <chris at chris-wilson.co.uk> writes:

> If the HW min/max frequencies are the same, there is not much range to
> deal with and a couple of our invalid tests become confused as they are
> actually no-ops.
>
> Error reporting in i915_pm_rps is rudimentary and we deserve better.
>
> Closes: https://gitlab.freedesktop.org/drm/intel/issues/1008
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  tests/i915/i915_pm_rps.c | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/tests/i915/i915_pm_rps.c b/tests/i915/i915_pm_rps.c
> index b65eefb03..56c745a5b 100644
> --- a/tests/i915/i915_pm_rps.c
> +++ b/tests/i915/i915_pm_rps.c
> @@ -397,9 +397,11 @@ static void min_max_config(void (*check)(void), bool load_gpu)
>  	writeval_inval(sysfs_files[MIN].filp, origfreqs[RP0] + 1000);
>  	check();
>  
> -	igt_debug("\nDecrease max to RPn (invalid)...\n");
> -	writeval_inval(sysfs_files[MAX].filp, origfreqs[RPn]);
> -	check();
> +	if (origfreqs[RPn] < origfreqs[RP0]) {
> +		igt_debug("\nDecrease max to RPn (invalid)...\n");
> +		writeval_inval(sysfs_files[MAX].filp, origfreqs[RPn]);
> +		check();
> +	}
>  
>  	igt_debug("\nDecrease min to midpoint...\n");
>  	writeval(sysfs_files[MIN].filp, fmid);
> @@ -429,9 +431,11 @@ static void min_max_config(void (*check)(void), bool load_gpu)
>  	writeval_inval(sysfs_files[MAX].filp, 0);
>  	check();
>  
> -	igt_debug("\nIncrease min to RP0 (invalid)...\n");
> -	writeval_inval(sysfs_files[MIN].filp, origfreqs[RP0]);
> -	check();
> +	if (origfreqs[RP0] > origfreqs[RP0]) {

RPn?
-Mika

> +		igt_debug("\nIncrease min to RP0 (invalid)...\n");
> +		writeval_inval(sysfs_files[MIN].filp, origfreqs[RP0]);
> +		check();
> +	}
>  
>  	igt_debug("\nIncrease max to midpoint...\n");
>  	writeval(sysfs_files[MAX].filp, fmid);
> -- 
> 2.25.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list