Re: [PATCH 2/2] drm/i915/gt: Leave rps->cur_freq on unpark

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris,

On Sun, Mar 22, 2020 at 04:32:25PM +0000, Chris Wilson wrote:
> Don't override our previous frequency we used after parking, and avoid
> continually spiking back to the efficient frequency for mostly idle
> workloads. Trust our ability to autotune across a workload switch.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Andi Shyti <andi.shyti@xxxxxxxxx>
> Cc: Lyude Paul <lyude@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gt/intel_rps.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c
> index 50884aeac49c..487c89593125 100644
> --- a/drivers/gpu/drm/i915/gt/intel_rps.c
> +++ b/drivers/gpu/drm/i915/gt/intel_rps.c
> @@ -187,10 +187,8 @@ static void gen5_rps_init(struct intel_rps *rps)
>  		fmax, fmin, fstart);
>  
>  	rps->min_freq = fmax;
> +	rps->efficient_freq = fstart;
>  	rps->max_freq = fmin;
> -
> -	rps->idle_freq = rps->min_freq;
> -	rps->cur_freq = rps->idle_freq;
>  }
>  
>  static unsigned long
> @@ -726,7 +724,6 @@ void intel_rps_unpark(struct intel_rps *rps)
>  
>  	WRITE_ONCE(rps->active, true);
>  
> -	freq = max(rps->cur_freq, rps->efficient_freq),
>  	freq = clamp(freq, rps->min_freq_softlimit, rps->max_freq_softlimit);
>  	intel_rps_set(rps, freq);
>  
> @@ -1672,7 +1669,7 @@ void intel_rps_init(struct intel_rps *rps)
>  	/* Finally allow us to boost to max by default */
>  	rps->boost_freq = rps->max_freq;
>  	rps->idle_freq = rps->min_freq;
> -	rps->cur_freq = rps->idle_freq;
> +	rps->cur_freq = rps->efficient_freq; /* start in the middle */

right... thank you!

Reviewed-by: Andi Shyti <andi.shyti@xxxxxxxxx>

Thanks,
Andi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux