Skip to contentSkip to conversation

drm/i915: Report all failed registers for ctx isolation

PATCH In review Mika Kuoppala 2 participants 2 messages Mar 31, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Report all failed registers for ctx isolation

We want to log all failed registers so don't stop
on a first.

---
 drivers/gpu/drm/i915/gt/selftest_lrc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gt/selftest_lrc.c +6 -2
index d3e163c93e22..7d7b0ab52b63 100644
@@ -5104,6 +5104,7 @@ static int compare_isolation(struct intel_engine_cs *engine,
 {
 	u32 x, dw, *hw, *lrc;
 	u32 *A[2], *B[2];
+	unsigned long failed;
 	int err = 0;
 
 	A[0] = i915_gem_object_pin_map(ref[0]->obj, I915_MAP_WC);
@@ -5136,6 +5137,7 @@ static int compare_isolation(struct intel_engine_cs *engine,
 	}
 	lrc += LRC_STATE_PN * PAGE_SIZE / sizeof(*hw);
 
+	failed = 0;
 	x = 0;
 	dw = 0;
 	hw = engine->pinned_default_state;
@@ -5169,8 +5171,7 @@ static int compare_isolation(struct intel_engine_cs *engine,
 					       hw[dw], hw[dw + 1],
 					       A[0][x], B[0][x], B[1][x],
 					       poison, lrc[dw + 1]);
-					err = -EINVAL;
-					break;
+					failed++;
 				}
 			}
 			dw += 2;
@@ -5179,6 +5180,9 @@ static int compare_isolation(struct intel_engine_cs *engine,
 	} while (dw < PAGE_SIZE / sizeof(u32) &&
 		 (hw[dw] & ~BIT(0)) != MI_BATCH_BUFFER_END);
 
+	if (failed)
+		err = -EINVAL;
+
 	i915_gem_object_unpin_map(ce->state->obj);
 err_B1:
 	i915_gem_object_unpin_map(result[1]->obj);
Signature · 6 lines
2.17.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw

Quoting Mika Kuoppala (2020-03-31 12:56:49)

Quoted 5 lines

We want to log all failed registers so don't stop
on a first.

The s.e.p. field is failing.

Quoted 35 lines
---
 drivers/gpu/drm/i915/gt/selftest_lrc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gt/selftest_lrc.c +3 -2
index d3e163c93e22..7d7b0ab52b63 100644
@@ -5104,6 +5104,7 @@ static int compare_isolation(struct intel_engine_cs *engine,
 {
        u32 x, dw, *hw, *lrc;
        u32 *A[2], *B[2];
+       unsigned long failed;
        int err = 0;
 
        A[0] = i915_gem_object_pin_map(ref[0]->obj, I915_MAP_WC);
@@ -5136,6 +5137,7 @@ static int compare_isolation(struct intel_engine_cs *engine,
        }
        lrc += LRC_STATE_PN * PAGE_SIZE / sizeof(*hw);
 
+       failed = 0;
        x = 0;
        dw = 0;
        hw = engine->pinned_default_state;
@@ -5169,8 +5171,7 @@ static int compare_isolation(struct intel_engine_cs *engine,
                                               hw[dw], hw[dw + 1],
                                               A[0][x], B[0][x], B[1][x],
                                               poison, lrc[dw + 1]);
-                                       err = -EINVAL;
-                                       break;
+                                       failed++;
                                }
                        }
                        dw += 2;

drivers/gpu/drm/i915/gt/selftest_lrc.c static int compare_isolation(struct intel_engine_cs *engine, · line 5188

Quoted 9 lines
drivers/gpu/drm/i915/gt/selftest_lrc.c +3 -0
@@ -5179,6 +5180,9 @@ static int compare_isolation(struct intel_engine_cs *engine,
        } while (dw < PAGE_SIZE / sizeof(u32) &&
                 (hw[dw] & ~BIT(0)) != MI_BATCH_BUFFER_END);
 
+       if (failed)
+               err = -EINVAL;
+
        i915_gem_object_unpin_map(ce->state->obj);
 err_B1:
        i915_gem_object_unpin_map(result[1]->obj);

You also want
@@ -5330,13 +5330,15 @@ static int live_lrc_isolation(void *arg)

                intel_engine_pm_get(engine);
                if (engine->pinned_default_state) {
                        for (i = 0; i < ARRAY_SIZE(poison); i++) {

- err = __lrc_isolation(engine, poison[i]);
- if (err)
- break;
+ int result;

- err = __lrc_isolation(engine, ~poison[i]);
- if (err)
- break;
+ result = __lrc_isolation(engine, poison[i]);
+ if (result && !err)
+ err = result;
+
+ result = __lrc_isolation(engine, ~poison[i]);
+ if (result && !err)

+                                       err = result;
                        }
                }
                intel_engine_pm_put(engine);

for this mode.

With that or as a separate patch,

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx