[Intel-gfx] [PATCH] drm/i915: Assert if the caller passes 0 to both timeouts for intel_wait_for_register
Chris Wilson
chris at chris-wilson.co.uk
Mon Oct 9 09:47:48 UTC 2017
__intel_wait_for_register_fw() code does not support "polling mode" i.e.
both timeout parameters being zero, and in such a case
Suggested-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
---
drivers/gpu/drm/i915/intel_uncore.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index edbd2c413728..5fbbda8b44ef 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -1634,6 +1634,7 @@ int __intel_wait_for_register_fw(struct drm_i915_private *dev_priv,
/* Catch any overuse of this function */
might_sleep_if(slow_timeout_ms);
GEM_BUG_ON(fast_timeout_us > 20000);
+ GEM_BUG_ON(!fast_timeout_us && !slow_timeout_ms);
ret = -ETIMEDOUT;
if (fast_timeout_us && fast_timeout_us <= 20000)
--
2.14.2
More information about the Intel-gfx
mailing list