[Intel-gfx] [PATCH 5/5] drm/i915: Split ctx timestamp selftest into two
Mika Kuoppala
mika.kuoppala at linux.intel.com
Tue Apr 21 13:16:33 UTC 2020
We use different workarounds for render engine than
for other engines. Split the selftest according to these
types so that we get error rates per workaround.
Signed-off-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>
---
drivers/gpu/drm/i915/gt/selftest_lrc.c | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
index 32c4096b627b..7daee5ca7d3b 100644
--- a/drivers/gpu/drm/i915/gt/selftest_lrc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
@@ -4749,10 +4749,9 @@ static int __lrc_timestamp(const struct lrc_timestamp *arg, bool preempt)
return err;
}
-static int live_lrc_timestamp(void *arg)
+static int __live_lrc_timestamp(struct intel_gt *gt, bool rcs)
{
struct lrc_timestamp data = {};
- struct intel_gt *gt = arg;
enum intel_engine_id id;
const u32 poison[] = {
0,
@@ -4774,6 +4773,12 @@ static int live_lrc_timestamp(void *arg)
unsigned long heartbeat;
int i, err = 0;
+ if (rcs && data.engine->class != RENDER_CLASS)
+ continue;
+
+ if (!rcs && data.engine->class == RENDER_CLASS)
+ continue;
+
engine_heartbeat_disable(data.engine, &heartbeat);
for (i = 0; i < ARRAY_SIZE(data.ce); i++) {
@@ -4825,6 +4830,20 @@ static int live_lrc_timestamp(void *arg)
return 0;
}
+static int live_lrc_timestamp_rcs(void *arg)
+{
+ struct intel_gt *gt = arg;
+
+ return __live_lrc_timestamp(gt, true);
+}
+
+static int live_lrc_timestamp_xcs(void *arg)
+{
+ struct intel_gt *gt = arg;
+
+ return __live_lrc_timestamp(gt, false);
+}
+
static struct i915_vma *
create_user_vma(struct i915_address_space *vm, unsigned long size)
{
@@ -5748,7 +5767,8 @@ int intel_lrc_live_selftests(struct drm_i915_private *i915)
SUBTEST(live_lrc_state),
SUBTEST(live_lrc_gpr),
SUBTEST(live_lrc_indirect_ctx_bb),
- SUBTEST(live_lrc_timestamp),
+ SUBTEST(live_lrc_timestamp_rcs),
+ SUBTEST(live_lrc_timestamp_xcs),
SUBTEST(live_lrc_garbage),
SUBTEST(live_pphwsp_runtime),
SUBTEST(live_lrc_isolation),
--
2.17.1
More information about the Intel-gfx
mailing list