diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-04-06 06:09:50 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-04-06 10:17:15 -0400 |
commit | 29991d533f6902757de7ffdb933c196421914b08 (patch) | |
tree | 1d50c837879533d5607daae47dd8f8bdddac5559 | |
parent | 2b2874efe2413c43f9e330023a03ec5203b372b2 (diff) |
drm/i915/selftests: Rename wait_for_hang() to wait_until_running()
Tvrtko mentioned that wait_for_hang() was confusing as it does not
actually wait for the aforementioned hang, just until the request is
running and we are *ready* to inject a hang. A quick
s/wait_for_hang/wait_until_running/ removes that confusion without
having to rethink the naming scheme, immediately at least.
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180406100950.19033-1-chris@chris-wilson.co.uk
-rw-r--r-- | drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c index d03abe7f8a53..8650853c8cb3 100644 --- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c +++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c | |||
@@ -322,7 +322,7 @@ static void hang_fini(struct hang *h) | |||
322 | flush_test(h->i915, I915_WAIT_LOCKED); | 322 | flush_test(h->i915, I915_WAIT_LOCKED); |
323 | } | 323 | } |
324 | 324 | ||
325 | static bool wait_for_hang(struct hang *h, struct i915_request *rq) | 325 | static bool wait_until_running(struct hang *h, struct i915_request *rq) |
326 | { | 326 | { |
327 | return !(wait_for_us(i915_seqno_passed(hws_seqno(h, rq), | 327 | return !(wait_for_us(i915_seqno_passed(hws_seqno(h, rq), |
328 | rq->fence.seqno), | 328 | rq->fence.seqno), |
@@ -504,7 +504,7 @@ static int __igt_reset_engine(struct drm_i915_private *i915, bool active) | |||
504 | __i915_request_add(rq, true); | 504 | __i915_request_add(rq, true); |
505 | mutex_unlock(&i915->drm.struct_mutex); | 505 | mutex_unlock(&i915->drm.struct_mutex); |
506 | 506 | ||
507 | if (!wait_for_hang(&h, rq)) { | 507 | if (!wait_until_running(&h, rq)) { |
508 | struct drm_printer p = drm_info_printer(i915->drm.dev); | 508 | struct drm_printer p = drm_info_printer(i915->drm.dev); |
509 | 509 | ||
510 | pr_err("%s: Failed to start request %x, at %x\n", | 510 | pr_err("%s: Failed to start request %x, at %x\n", |
@@ -747,7 +747,7 @@ static int __igt_reset_engines(struct drm_i915_private *i915, | |||
747 | __i915_request_add(rq, true); | 747 | __i915_request_add(rq, true); |
748 | mutex_unlock(&i915->drm.struct_mutex); | 748 | mutex_unlock(&i915->drm.struct_mutex); |
749 | 749 | ||
750 | if (!wait_for_hang(&h, rq)) { | 750 | if (!wait_until_running(&h, rq)) { |
751 | struct drm_printer p = drm_info_printer(i915->drm.dev); | 751 | struct drm_printer p = drm_info_printer(i915->drm.dev); |
752 | 752 | ||
753 | pr_err("%s: Failed to start request %x, at %x\n", | 753 | pr_err("%s: Failed to start request %x, at %x\n", |
@@ -935,7 +935,7 @@ static int igt_wait_reset(void *arg) | |||
935 | i915_request_get(rq); | 935 | i915_request_get(rq); |
936 | __i915_request_add(rq, true); | 936 | __i915_request_add(rq, true); |
937 | 937 | ||
938 | if (!wait_for_hang(&h, rq)) { | 938 | if (!wait_until_running(&h, rq)) { |
939 | struct drm_printer p = drm_info_printer(i915->drm.dev); | 939 | struct drm_printer p = drm_info_printer(i915->drm.dev); |
940 | 940 | ||
941 | pr_err("%s: Failed to start request %x, at %x\n", | 941 | pr_err("%s: Failed to start request %x, at %x\n", |
@@ -1066,7 +1066,7 @@ static int igt_reset_queue(void *arg) | |||
1066 | goto fini; | 1066 | goto fini; |
1067 | } | 1067 | } |
1068 | 1068 | ||
1069 | if (!wait_for_hang(&h, prev)) { | 1069 | if (!wait_until_running(&h, prev)) { |
1070 | struct drm_printer p = drm_info_printer(i915->drm.dev); | 1070 | struct drm_printer p = drm_info_printer(i915->drm.dev); |
1071 | 1071 | ||
1072 | pr_err("%s(%s): Failed to start request %x, at %x\n", | 1072 | pr_err("%s(%s): Failed to start request %x, at %x\n", |
@@ -1177,7 +1177,7 @@ static int igt_handle_error(void *arg) | |||
1177 | i915_request_get(rq); | 1177 | i915_request_get(rq); |
1178 | __i915_request_add(rq, true); | 1178 | __i915_request_add(rq, true); |
1179 | 1179 | ||
1180 | if (!wait_for_hang(&h, rq)) { | 1180 | if (!wait_until_running(&h, rq)) { |
1181 | struct drm_printer p = drm_info_printer(i915->drm.dev); | 1181 | struct drm_printer p = drm_info_printer(i915->drm.dev); |
1182 | 1182 | ||
1183 | pr_err("%s: Failed to start request %x, at %x\n", | 1183 | pr_err("%s: Failed to start request %x, at %x\n", |