drm/i915/selftests: Use GT engines in igt_live_test
Frees up two call sites from passing i915 to for_each_engine. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-11-tvrtko.ursulin@linux.intel.com
This commit is contained in:
parent
6457099ac5
commit
d1a03ee7e9
@ -16,6 +16,7 @@ int igt_live_test_begin(struct igt_live_test *t,
|
||||
const char *func,
|
||||
const char *name)
|
||||
{
|
||||
struct intel_gt *gt = &i915->gt;
|
||||
struct intel_engine_cs *engine;
|
||||
enum intel_engine_id id;
|
||||
int err;
|
||||
@ -24,7 +25,7 @@ int igt_live_test_begin(struct igt_live_test *t,
|
||||
t->func = func;
|
||||
t->name = name;
|
||||
|
||||
err = intel_gt_wait_for_idle(&i915->gt, MAX_SCHEDULE_TIMEOUT);
|
||||
err = intel_gt_wait_for_idle(gt, MAX_SCHEDULE_TIMEOUT);
|
||||
if (err) {
|
||||
pr_err("%s(%s): failed to idle before, with err=%d!",
|
||||
func, name, err);
|
||||
@ -33,7 +34,7 @@ int igt_live_test_begin(struct igt_live_test *t,
|
||||
|
||||
t->reset_global = i915_reset_count(&i915->gpu_error);
|
||||
|
||||
for_each_engine(engine, i915, id)
|
||||
for_each_engine(engine, gt, id)
|
||||
t->reset_engine[id] =
|
||||
i915_reset_engine_count(&i915->gpu_error, engine);
|
||||
|
||||
@ -56,7 +57,7 @@ int igt_live_test_end(struct igt_live_test *t)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
for_each_engine(engine, i915, id) {
|
||||
for_each_engine(engine, &i915->gt, id) {
|
||||
if (t->reset_engine[id] ==
|
||||
i915_reset_engine_count(&i915->gpu_error, engine))
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user