public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Belgaumkar, Vinay" <vinay.belgaumkar@intel.com>
To: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc/slpc: Apply min softlimit correctly
Date: Wed, 14 Jun 2023 00:35:10 -0700	[thread overview]
Message-ID: <74d9e79d-4e03-2eb0-e71e-36d692278341@intel.com> (raw)
In-Reply-To: <87zg52ye3d.wl-ashutosh.dixit@intel.com>


On 6/13/2023 7:25 PM, Dixit, Ashutosh wrote:
> On Fri, 09 Jun 2023 15:02:52 -0700, Vinay Belgaumkar wrote:
> Hi Vinay,
>
>> We were skipping when min_softlimit was equal to RPn. We need to apply
>> it rergardless as efficient frequency will push the SLPC min to RPe.
> regardless
>
>> This will break scenarios where user sets a min softlimit < RPe before
>> reset and then performs a GT reset.
> Can you explain the reason for the patch clearly in terms of variables in
> the code, what variable has what value and what is the bug. I am not
> following from the above description.

Hi Ashutosh,

Scenario being fixed here is exactly the one in i915_pm_freq_api 
reset/suspend subtests (currently in review). Test sets min freq to RPn 
and then performs a reset. It then checks if cur_freq is RPn.

Here's the sequence that shows the problem-

RPLS:/home/gta# modprobe i915
RPLS:/home/gta# echo 1 > /sys/class/drm/card0/gt/gt0/slpc_ignore_eff_freq
RPLS:/home/gta# echo 300 > /sys/class/drm/card0/gt_min_freq_mhz (RPn)
RPLS:/home/gta# cat /sys/class/drm/card0/gt_cur_freq_mhz --> cur == RPn 
as expected
300
RPLS:/home/gta# echo 1 > /sys/kernel/debug/dri/0/gt0/reset --> reset
RPLS:/home/gta# cat /sys/class/drm/card0/gt_min_freq_mhz --> shows the 
internal cached variable correctly
300
RPLS:/home/gta# cat /sys/class/drm/card0/gt_cur_freq_mhz --> actual freq 
being requested by SLPC (it's not RPn!!)
700

We need to sync up driver min freq value and SLPC min after a 
reset/suspend. Currently, we skip if the user had manually set min to 
RPn (this was an optimization we had before we enabled efficient freq 
usage).

Thanks,

Vinay.

>
> Thanks.
> --
> Ashutosh
>
>
>> Fixes: 95ccf312a1e4 ("drm/i915/guc/slpc: Allow SLPC to use efficient frequency")
>>
>> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>> ---
>>   drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>> index 01b75529311c..ee9f83af7cf6 100644
>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>> @@ -606,7 +606,7 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc)
>> 		if (unlikely(ret))
>> 			return ret;
>> 		slpc_to_gt(slpc)->defaults.min_freq = slpc->min_freq_softlimit;
>> -	} else if (slpc->min_freq_softlimit != slpc->min_freq) {
>> +	} else {
>> 		return intel_guc_slpc_set_min_freq(slpc,
>> 						   slpc->min_freq_softlimit);
>> 	}
>> --
>> 2.38.1
>>

  reply	other threads:[~2023-06-14  7:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 22:02 [Intel-gfx] [PATCH] drm/i915/guc/slpc: Apply min softlimit correctly Vinay Belgaumkar
2023-06-09 23:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-06-11 11:35 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-06-14  2:25 ` [Intel-gfx] [PATCH] " Dixit, Ashutosh
2023-06-14  7:35   ` Belgaumkar, Vinay [this message]
2023-06-15 17:04 ` 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=74d9e79d-4e03-2eb0-e71e-36d692278341@intel.com \
    --to=vinay.belgaumkar@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@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