Message ID | 1494429572-15118-1-git-send-email-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, May 10, 2017 at 05:19:32PM +0200, Daniel Vetter wrote: > The unconditionally fallback to the blocking wait_for resulted in > impressive fireworks at boot-up on my snb here. Make sure if we set > the slow timeout to 0 that we never ever sleep. The tail of the > callchain was > > intel_wait_for_register > -> __intel_wait_for_register_fw > -> usleep_range > -> BOOM > > It blew up in intel_crt_detect load detection code on the > ADPA_CRT_HOTPLUG_FORCE_TRIGGER in the ADPA register. > > v2: Shut up gcc. u32 uninitialized_var(reg_value) ? -Chris
On Wed, May 10, 2017 at 05:06:38PM +0100, Chris Wilson wrote: > On Wed, May 10, 2017 at 05:19:32PM +0200, Daniel Vetter wrote: > > The unconditionally fallback to the blocking wait_for resulted in > > impressive fireworks at boot-up on my snb here. Make sure if we set > > the slow timeout to 0 that we never ever sleep. The tail of the > > callchain was > > > > intel_wait_for_register > > -> __intel_wait_for_register_fw > > -> usleep_range > > -> BOOM > > > > It blew up in intel_crt_detect load detection code on the > > ADPA_CRT_HOTPLUG_FORCE_TRIGGER in the ADPA register. > > > > v2: Shut up gcc. > > u32 uninitialized_var(reg_value) ? Polished to v3 and applied, thanks for your review. -Daniel
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index aa9d3065853c..08abb2cb7837 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -1598,7 +1598,7 @@ int __intel_wait_for_register_fw(struct drm_i915_private *dev_priv, unsigned int slow_timeout_ms, u32 *out_value) { - u32 reg_value; + u32 reg_value = 0; #define done (((reg_value = I915_READ_FW(reg)) & mask) == value) int ret; @@ -1609,7 +1609,7 @@ int __intel_wait_for_register_fw(struct drm_i915_private *dev_priv, ret = -ETIMEDOUT; if (fast_timeout_us && fast_timeout_us <= 20000) ret = _wait_for_atomic(done, fast_timeout_us, 0); - if (ret) + if (ret && slow_timeout_ms) ret = wait_for(done, slow_timeout_ms); if (out_value)