Commit 8005f37c authored by Chris Wilson's avatar Chris Wilson

drm/i915/selftests: Improve granularity for mocs reset checks

Allow us to validate mocs configurations after reset if we have either
engine or global reset.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201120140314.24749-2-chris@chris-wilson.co.uk
parent 67dd0b96
......@@ -361,29 +361,34 @@ static int active_engine_reset(struct intel_context *ce,
static int __live_mocs_reset(struct live_mocs *mocs,
struct intel_context *ce)
{
struct intel_gt *gt = ce->engine->gt;
int err;
err = intel_engine_reset(ce->engine, "mocs");
if (err)
return err;
if (intel_has_reset_engine(gt)) {
err = intel_engine_reset(ce->engine, "mocs");
if (err)
return err;
err = check_mocs_engine(mocs, ce);
if (err)
return err;
err = check_mocs_engine(mocs, ce);
if (err)
return err;
err = active_engine_reset(ce, "mocs");
if (err)
return err;
err = active_engine_reset(ce, "mocs");
if (err)
return err;
err = check_mocs_engine(mocs, ce);
if (err)
return err;
err = check_mocs_engine(mocs, ce);
if (err)
return err;
}
intel_gt_reset(ce->engine->gt, ce->engine->mask, "mocs");
if (intel_has_gpu_reset(gt)) {
intel_gt_reset(gt, ce->engine->mask, "mocs");
err = check_mocs_engine(mocs, ce);
if (err)
return err;
err = check_mocs_engine(mocs, ce);
if (err)
return err;
}
return 0;
}
......@@ -398,9 +403,6 @@ static int live_mocs_reset(void *arg)
/* Check the mocs setup is retained over per-engine and global resets */
if (!intel_has_reset_engine(gt))
return 0;
err = live_mocs_init(&mocs, gt);
if (err)
return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment