__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 <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
---
 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

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

Reply via email to