From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Andi Shyti <andi@etezian.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: add basic selftests for rc6
Date: Thu, 06 Feb 2020 14:15:45 +0200 [thread overview]
Message-ID: <87lfpfap3i.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200205184055.GA3088@jack.zhora.eu>
Andi Shyti <andi@etezian.org> writes:
> Hi Mika,
>
>> > +static bool test_rc6(struct intel_rc6 *rc6, bool enabled)
>> > +{
>> > + struct intel_uncore *uncore = rc6_to_uncore(rc6);
>> > + intel_wakeref_t wakeref;
>> > + u32 ec1, ec2;
>> > + u32 interval;
>> > +
>> > + wakeref = intel_runtime_pm_get(uncore->rpm);
>> > +
>> > + interval = intel_uncore_read(uncore, GEN6_RC_EVALUATION_INTERVAL);
>> > +
>> > + /*
>> > + * the interval is stored in steps of 1.28us
>> > + */
>> > + interval = div_u64(mul_u32_u32(interval, 128),
>> > + 100 * 1000); /* => miliseconds */
>> > +
>>
>> s/miliseconds/milliseconds.
>
> thanks!
>
>> I have a faint memory that the interval was not always 1.28us
>> but gen dependant.
>
> 1.28 is the incremental step and I haven't seen any different
> value in the docs. Have you?
I must have been mixing this with freq bins. Sorry.
And in this level as Chris said, we dont need to care.
>
>> > + pr_info("interval:%x [%dms], threshold:%x, rc6:%x, enabled?:%s\n",
>> > + intel_uncore_read(uncore, GEN6_RC_EVALUATION_INTERVAL),
>> > + interval,
>> > + intel_uncore_read(uncore, GEN6_RC6_THRESHOLD),
>> > + ec2 - ec1,
>> > + yesno(enabled));
>> > +
>> > + intel_runtime_pm_put(uncore->rpm, wakeref);
>> > +
>> > + return enabled != (ec1 >= ec2);
>>
>> Wrap?
>
> actually here I forgot a couple of things that went forgotten in
> my git repo.
>
> Anyway, do you mean with "wrap" to add parenthesis?
>
I meant that if you take samples between wrap
period.
-Mika
>> > + intel_rc6_unpark(rc6);
>> > +
>> > + /* interval < threshold */
>> > + if (!test_rc6(rc6, false)) {
>>
>> consider removing the assertion of 'activeness' in parameter
>> and just if (!rc6_active(rc6)). Or am I missing something in here?
>
> yes, you are right, it's misleading. I will make it more clear.
>
> The basic idea is:
>
> 1. disable rc6
> 2. check whether it's disabled test_rc6(rc6, false)
>
> or
>
> 1. enable rc6
> 2. check if it's enabled test_rc6(rc6, true)
>
> Chris was skeptical about the naming as well.
>
> Thanks!
>
> Andi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-02-06 12:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 10:57 [Intel-gfx] [PATCH] drm/i915/selftests: add basic selftests for rc6 Chris Wilson
2020-02-05 14:31 ` Mika Kuoppala
2020-02-05 18:40 ` Andi Shyti
2020-02-05 21:21 ` Chris Wilson
2020-02-06 12:15 ` Mika Kuoppala [this message]
2020-02-05 15:06 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: add basic selftests for rc6 (rev5) Patchwork
2020-02-05 15:37 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2019-11-22 0:16 [PATCH] drm/i915/selftests: add basic selftests for rc6 Chris Wilson
2019-11-22 0:16 ` [Intel-gfx] " Chris Wilson
2019-11-22 0:19 ` Chris Wilson
2019-11-22 0:19 ` [Intel-gfx] " Chris Wilson
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=87lfpfap3i.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=andi@etezian.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