@@ -495,7 +495,8 @@ struct i915_request *intel_context_create_request(struct intel_context *ce)
*/
lockdep_unpin_lock(&ce->timeline->mutex, rq->cookie);
mutex_release(&ce->timeline->mutex.dep_map, _RET_IP_);
- mutex_acquire(&ce->timeline->mutex.dep_map, SINGLE_DEPTH_NESTING, 0, _RET_IP_);
+ mutex_acquire(&ce->timeline->mutex.dep_map, SELFTEST_WA_NESTING, 0,
+ _RET_IP_);
rq->cookie = lockdep_pin_lock(&ce->timeline->mutex);
return rq;
@@ -25,6 +25,8 @@
##__VA_ARGS__); \
} while (0)
+#define SELFTEST_WA_NESTING SINGLE_DEPTH_NESTING
+
struct i915_gem_ww_ctx;
void intel_context_init(struct intel_context *ce,
@@ -688,7 +688,7 @@ static int live_hwsp_wrap(void *arg)
tl->seqno = -4u;
- mutex_lock_nested(&tl->mutex, SINGLE_DEPTH_NESTING);
+ mutex_lock_nested(&tl->mutex, SELFTEST_WA_NESTING + 1);
err = intel_timeline_get_seqno(tl, rq, &seqno[0]);
mutex_unlock(&tl->mutex);
if (err) {
@@ -705,7 +705,7 @@ static int live_hwsp_wrap(void *arg)
}
hwsp_seqno[0] = tl->hwsp_seqno;
- mutex_lock_nested(&tl->mutex, SINGLE_DEPTH_NESTING);
+ mutex_lock_nested(&tl->mutex, SELFTEST_WA_NESTING + 1);
err = intel_timeline_get_seqno(tl, rq, &seqno[1]);
mutex_unlock(&tl->mutex);
if (err) {
@@ -1037,7 +1037,8 @@ static int live_hwsp_read(void *arg)
goto out;
}
- mutex_lock(&watcher[0].rq->context->timeline->mutex);
+ mutex_lock_nested(&watcher[0].rq->context->timeline->mutex,
+ SELFTEST_WA_NESTING + 1);
err = intel_timeline_read_hwsp(rq, watcher[0].rq, &hwsp);
if (err == 0)
err = emit_read_hwsp(watcher[0].rq, /* before */
@@ -1050,7 +1051,8 @@ static int live_hwsp_read(void *arg)
goto out;
}
- mutex_lock(&watcher[1].rq->context->timeline->mutex);
+ mutex_lock_nested(&watcher[1].rq->context->timeline->mutex,
+ SELFTEST_WA_NESTING + 1);
err = intel_timeline_read_hwsp(rq, watcher[1].rq, &hwsp);
if (err == 0)
err = emit_read_hwsp(watcher[1].rq, /* after */