[Intel-gfx] [PATCH 17/17] drm/i915/selftests: Exercise rc6 handling
Chris Wilson
chris at chris-wilson.co.uk
Tue Nov 19 15:27:48 UTC 2019
Quoting Andi Shyti (2019-11-19 15:24:59)
> Hi Chris,
>
> On Tue, Nov 19, 2019 at 10:09:29AM +0000, Chris Wilson wrote:
> > Reading from CTX_INFO upsets rc6, requiring us to detect and prevent
> > possible rc6 context corruption. Poke at the bear!
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Imre Deak <imre.deak at intel.com>
> > Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
>
> it looks good,
>
> Reviewed-by: Andi Shyti <andi.shyti at intel.com>
> Tested-by: Andi Shyti <andi.shyti at intel.com>
>
> just a question, though
>
> > diff --git a/drivers/gpu/drm/i915/gt/selftest_gt_pm.c b/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
> > index d1752f15702a..1d5bf93d1258 100644
> > --- a/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
> > +++ b/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
> > @@ -6,6 +6,7 @@
> > */
> >
> > #include "selftest_llc.h"
> > +#include "selftest_rc6.h"
> >
> > static int live_gt_resume(void *arg)
> > {
> > @@ -58,3 +59,15 @@ int intel_gt_pm_live_selftests(struct drm_i915_private *i915)
> >
> > return intel_gt_live_subtests(tests, &i915->gt);
> > }
> > +
> > +int intel_gt_pm_late_selftests(struct drm_i915_private *i915)
> > +{
> > + static const struct i915_subtest tests[] = {
> > + SUBTEST(live_rc6_ctx),
> > + };
> > +
> > + if (intel_gt_is_wedged(&i915->gt))
> > + return 0;
> > +
> > + return intel_gt_live_subtests(tests, &i915->gt);
> > +}
>
> are you thinking of making this file a hub for all power
> management selftests? wouldn't it be more neat if rc6, rps and
> others have their own selftests declared independently,
> considering that we might want to add more of them?
The hub is over at intel_gt_pm_selftests :)
I started by adding this one there, except that this deliberately breaks
the system and so should be run at the end of CI and rebooted
afterwards.
>
> > +static const u32 *__live_rc6_ctx(struct intel_context *ce)
> > +{
> > + struct i915_request *rq;
> > + u32 const *result;
>
> 'const' here? you like reckless life! :)
Shame on me.
-Chris
More information about the Intel-gfx
mailing list