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,8 +361,10 @@ static int active_engine_reset(struct intel_context *ce, ...@@ -361,8 +361,10 @@ static int active_engine_reset(struct intel_context *ce,
static int __live_mocs_reset(struct live_mocs *mocs, static int __live_mocs_reset(struct live_mocs *mocs,
struct intel_context *ce) struct intel_context *ce)
{ {
struct intel_gt *gt = ce->engine->gt;
int err; int err;
if (intel_has_reset_engine(gt)) {
err = intel_engine_reset(ce->engine, "mocs"); err = intel_engine_reset(ce->engine, "mocs");
if (err) if (err)
return err; return err;
...@@ -378,12 +380,15 @@ static int __live_mocs_reset(struct live_mocs *mocs, ...@@ -378,12 +380,15 @@ static int __live_mocs_reset(struct live_mocs *mocs,
err = check_mocs_engine(mocs, ce); err = check_mocs_engine(mocs, ce);
if (err) if (err)
return 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); err = check_mocs_engine(mocs, ce);
if (err) if (err)
return err; return err;
}
return 0; return 0;
} }
...@@ -398,9 +403,6 @@ static int live_mocs_reset(void *arg) ...@@ -398,9 +403,6 @@ static int live_mocs_reset(void *arg)
/* Check the mocs setup is retained over per-engine and global resets */ /* 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); err = live_mocs_init(&mocs, gt);
if (err) if (err)
return 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