From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc/slpc: Add a new SLPC selftest
Date: Fri, 24 Jun 2022 20:59:38 -0700 [thread overview]
Message-ID: <87k0958kb9.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20220623233320.11041-1-vinay.belgaumkar@intel.com>
On Thu, 23 Jun 2022 16:33:20 -0700, Vinay Belgaumkar wrote:
>
> +static int max_granted_freq(struct intel_guc_slpc *slpc, struct intel_rps *rps, u32 *max_act_freq)
> +{
> + struct intel_gt *gt = rps_to_gt(rps);
> + u32 perf_limit_reasons;
> + int err = 0;
>
> - igt_spinner_end(&spin);
> - st_engine_heartbeat_enable(engine);
> - }
> + err = slpc_set_min_freq(slpc, slpc->rp0_freq);
> + if (err)
> + return err;
>
> - pr_info("Max actual frequency for %s was %d\n",
> - engine->name, max_act_freq);
> + *max_act_freq = intel_rps_read_actual_frequency(rps);
> + if (!(*max_act_freq == slpc->rp0_freq)) {
nit but '*max_act_freq != slpc->rp0_freq'
> + /* Check if there was some throttling by pcode */
> + perf_limit_reasons = intel_uncore_read(gt->uncore, GT0_PERF_LIMIT_REASONS);
>
> - /* Actual frequency should rise above min */
> - if (max_act_freq == slpc_min_freq) {
> - pr_err("Actual freq did not rise above min\n");
> + /* If not, this is an error */
> + if (!(perf_limit_reasons && GT0_PERF_LIMIT_REASONS_MASK)) {
Still wrong, should be & not &&
> + pr_err("Pcode did not grant max freq\n");
> err = -EINVAL;
> - }
> + } else {
> + pr_info("Pcode throttled frequency 0x%x\n", perf_limit_reasons);
Another question, why are we using pr_err/info here rather than
drm_err/info? pr_err/info is ok for mock selftests since there is no drm
device but that is not the case here, I think this is done in other
selftests too but maybe fix this as well if we are making so many changes
here? Anyway can do later too.
So let's settle issues in v2 thread first.
Thanks.
--
Ashutosh
next prev parent reply other threads:[~2022-06-25 3:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 23:33 [Intel-gfx] [PATCH] drm/i915/guc/slpc: Add a new SLPC selftest Vinay Belgaumkar
2022-06-24 0:03 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/guc/slpc: Add a new SLPC selftest (rev3) Patchwork
2022-06-24 0:26 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-06-25 3:59 ` Dixit, Ashutosh [this message]
2022-06-27 22:52 ` [Intel-gfx] [PATCH] drm/i915/guc/slpc: Add a new SLPC selftest Belgaumkar, Vinay
2022-06-27 23:02 ` Belgaumkar, Vinay
-- strict thread matches above, loose matches on Subject: below --
2022-06-27 23:03 Vinay Belgaumkar
2022-06-28 4:48 ` Dixit, Ashutosh
2022-06-10 23:47 Vinay Belgaumkar
2022-06-22 20:32 ` Dixit, Ashutosh
2022-06-23 23:21 ` Belgaumkar, Vinay
2022-06-25 3:59 ` Dixit, Ashutosh
2022-06-27 22:52 ` Belgaumkar, Vinay
2022-06-10 21:18 Vinay Belgaumkar
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=87k0958kb9.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=vinay.belgaumkar@intel.com \
/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