[Intel-gfx] [PATCH v3] drm/i915/selftests: add basic selftests for rc6
Chris Wilson
chris at chris-wilson.co.uk
Tue Dec 3 12:41:40 UTC 2019
Quoting Andi Shyti (2019-12-03 12:32:24)
> > > > }
> > > > +
> > > > +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.
That's how I thought it would look since for the first test,
test_rc6(rc6->enabled) makes sense. But I would like to know the values
of EI, THRESHOLD, slept and measured rc6 to understand failures better.
And when we do get better understanding, the next wave of tests I expect
will be more than simple booleans, but did we get x rc6 cycles. (That
depends on much we keep scratching at the rc6 powersaving surface :)
-Chris
More information about the Intel-gfx
mailing list