[Intel-gfx] [PATCH 05/19] drm/i915/selftests: Verify we can perform resets from atomic context
Chris Wilson
chris at chris-wilson.co.uk
Thu Dec 13 08:42:11 UTC 2018
Quoting Tvrtko Ursulin (2018-12-13 08:28:00)
>
> On 12/12/2018 13:41, Chris Wilson wrote:
> > +static int igt_atomic_reset(void *arg)
> > +{
> > + static const struct atomic_section phases[] = {
> > + { "preempt", __preempt_begin, __preempt_end },
> > + { "softirq", __softirq_begin, __softirq_end },
> > + { "hardirq", __hardirq_begin, __hardirq_end },
> > + { }
> > + };
> > + struct drm_i915_private *i915 = arg;
> > + int err = 0;
> > +
> > + /* Check that the resets are usable from atomic context */
> > +
> > + if (USES_GUC_SUBMISSION(i915))
> > + return 0; /* guc is dead; long live the guc */
> > +
> > + igt_global_reset_lock(i915);
> > + mutex_lock(&i915->drm.struct_mutex);
> > + intel_runtime_pm_get(i915);
> > +
> > + /* Flush any requests before we get started and check basics */
> > + force_reset(i915);
> > + if (i915_terminally_wedged(&i915->gpu_error))
> > + goto unlock;
> > +
> > + if (intel_has_reset_engine(i915)) {
>
> This check could/should go earlier.
My plan is to add a device reset test here later.
-Chris
More information about the Intel-gfx
mailing list