From: Andi Shyti <andi.shyti@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6
Date: Tue, 3 Dec 2019 14:32:24 +0200 [thread overview]
Message-ID: <20191203123224.GB1254@intel.intel> (raw)
In-Reply-To: <20191203115449.GA1254@intel.intel>
> > > }
> > > +
> > > +static bool test_rc6(struct intel_rc6 *rc6, bool enabled)
> >
> > I keep getting confused as to the meaning of the result, forgetting it
> > changes based on bool enabled.
> >
> > Maybe u32 measure_rc6() and leave the pass/fail to the caller?
thinking a bit better... what exactly would I return? what would
measure_rc6 measure? The "sleeping" function is not precise by
definition (as you pointed out as well) and it would be out from
the scope of this function to provide an exact measure of the
interval count.
The way I would rather do it would be:
u32 measure_rc6(u32 time_in_ms)
{
...
}
bool test_rc6(bool enable)
{
...
return enable ^ does_rc6_work(2 * interval);
}
where measure_rc6 provides the counter in a more precise time
range and can be also used for other tests, like hysteresis or
duty cycle tests where I guess time measurement is more critical.
But as for now such function wouldn't be of any use. I could
eventually call 'test_rc6' in a more intuitive way, like
'is_rc6_enabled()'.
Andi
> yes, I was thinking the same, it makes, indeed more sense.
>
> The original idea was just to know whether rc6 works or not.
>
> 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:[~2019-12-03 12:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 8:53 [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6 Andi Shyti
2019-12-03 9:25 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/selftests: add basic selftests for rc6 (rev3) Patchwork
2019-12-03 11:01 ` [Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6 Chris Wilson
2019-12-03 11:54 ` Andi Shyti
2019-12-03 12:32 ` Andi Shyti [this message]
2019-12-03 12:41 ` 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=20191203123224.GB1254@intel.intel \
--to=andi.shyti@intel.com \
--cc=chris@chris-wilson.co.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.