public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Antonio Argenziano <antonio.argenziano@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org, Praveen <praveen.paneri@intel.com>
Subject: Re: [PATCH igt] igt: Add gem_ctx_freq to exercise requesting freq on a ctx
Date: Fri, 9 Mar 2018 11:15:45 -0800	[thread overview]
Message-ID: <9f3c8a10-1991-af2f-355b-bdd92a56b8d7@intel.com> (raw)
In-Reply-To: <152055742878.10591.2816434293345017095@mail.alporthouse.com>



On 08/03/18 17:03, Chris Wilson wrote:
> Quoting Antonio Argenziano (2018-03-09 00:45:42)
>>
>>
>> On 08/03/18 09:13, Chris Wilson wrote:
>>> Exercise some new API that allows applications to request that
>>> individual contexts are executed within a desired frequency range.
>>>
>>> v2: Split single/continuous set_freq subtests
>>>
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Paneri, Praveen <praveen.paneri@intel.com>
>>> Cc: Kamble, Sagar A <sagar.a.kamble@intel.com>
>>> Cc: Antonio Argenziano <antonio.argenziano@intel.com>
>>> ---
>>>    tests/Makefile.am      |   1 +
>>>    tests/Makefile.sources |   1 +
>>>    tests/gem_ctx_freq.c   | 604 +++++++++++++++++++++++++++++++++++++++++++++++++
>>>    tests/meson.build      |   1 +
>>>    4 files changed, 607 insertions(+)
>>>    create mode 100644 tests/gem_ctx_freq.c
>>>
>>

>>> +             uint32_t cur, discard;
>>> +
>>> +             set_freq(fd, ctx, freq, freq);
>>> +             get_freq(fd, ctx, &cur, &discard);
>>
>> igt_assert_eq(freq, cur)?
> 
> Not quite. The trick is that the interface is not strictly idempotent,
> since we pass in MHz, the driver converts that into freq bins and spits
> it back out to the nearest MHz. So cur is not strictly freq, it just
> happens that 50MHz is the bin size on gen9.
> 
> The idea here is that we grab the adjusted freq from the driver to
> validate with.

I see, can we enforce a tolerance? It feels like we are trusting the 
kernel too much, but if that is the only thing we can do...

>>> +static void smoketest(int fd, int timeout)
>>> +{
>>> +     unsigned int engines[16];
>>
>> use a macro instead of magic number 16.
> 
> #define THIS_IS_FAR_MORE_MAGIC_THAN_A_MEANINGLESS_BARE_NUMBER_THAT_YOU_SHOULD_NOT_BE_READING_ANYTHING_INTO 16
> /rant

We call that MAX_EGINES in gem_exec_schedule ;).

Thanks,
Antonio

> 
>>> +static void invalid_param(int fd)
>>> +{
>>
>> gem_ctx_param is going to be upset again pretty soon ;).
> 
> Poor thing.
> -Chris
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-03-09 19:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08 17:13 [PATCH igt] igt: Add gem_ctx_freq to exercise requesting freq on a ctx Chris Wilson
2018-03-09  0:45 ` Antonio Argenziano
2018-03-09  1:03   ` Chris Wilson
2018-03-09 19:15     ` Antonio Argenziano [this message]
2018-03-09 20:37       ` Chris Wilson
2018-03-09 13:46 ` Chris Wilson
2018-03-09 17:06   ` Tvrtko Ursulin
2018-03-09 17:24     ` Chris Wilson
2018-03-09 21:35 ` Chris Wilson
2018-03-12 21:13   ` Antonio Argenziano
2018-03-13 12:38   ` Sagar Arun Kamble
2018-03-13 12:50     ` Chris Wilson
2018-03-09 22:11 ` ✓ Fi.CI.BAT: success for igt: Add gem_ctx_freq to exercise requesting freq on a ctx (rev2) Patchwork
2018-03-10  6:24 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-03-13 13:26 ` [PATCH igt] igt: Add gem_ctx_freq to exercise requesting freq on a ctx Chris Wilson
2018-03-13 13:58 ` Chris Wilson
2018-03-14  8:15   ` Sagar Arun Kamble
2018-03-14  9:03     ` Chris Wilson
2018-03-14  9:49       ` Sagar Arun Kamble
  -- strict thread matches above, loose matches on Subject: below --
2018-03-07 22:49 Chris Wilson
2018-03-08  0:13 ` Chris Wilson
2018-03-08  0:55 ` Antonio Argenziano
2018-03-08  1:18   ` Chris Wilson
2018-03-08 17:33     ` Antonio Argenziano
2018-03-08 17:39       ` Chris Wilson
2018-03-08  1:59 ` 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=9f3c8a10-1991-af2f-355b-bdd92a56b8d7@intel.com \
    --to=antonio.argenziano@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=praveen.paneri@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