[Intel-gfx] [PATCH 4/7] drm/i915/selftests: Add tests for GT and engine workaround verification

Chris Wilson chris at chris-wilson.co.uk
Mon Dec 3 11:57:44 UTC 2018


Quoting Tvrtko Ursulin (2018-12-03 11:46:14)
> +static int
> +live_engine_reset_gt_engine_workarounds(void *arg)
> +{
...
> +               ok = verify_gt_engine_wa(i915, "after idle reset");
> +               if (!ok) {
> +                       ret = -ESRCH;
> +                       goto err;
> +               }
> +
> +               ret = igt_spinner_init(&spin, i915);
> +               if (ret)
> +                       goto err;
> +
> +               intel_runtime_pm_get(i915);
> +
> +               rq = igt_spinner_create_request(&spin, ctx, engine, MI_NOOP);
> +               if (IS_ERR(rq)) {
> +                       ret = PTR_ERR(rq);
> +                       igt_spinner_fini(&spin);

Missing rpm_put

> +                       goto err;
> +               }
> +
> +               i915_request_add(rq);
> +
> +               if (!igt_wait_for_spinner(&spin, rq)) {
> +                       pr_err("Spinner failed to start\n");
> +                       igt_spinner_fini(&spin);
> +                       ret = -ETIMEDOUT;

Missing rpm_put

I need to convince people to take the wakeref tracking to make these
leaks more obvious :)
-Chris


More information about the Intel-gfx mailing list