projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e11ffdd
)
drm/i915: Fix __intel_wait_for_register_fw to not sleep in atomic
author
Daniel Vetter
<
[email protected]
>
Wed, 10 May 2017 15:19:32 +0000
(17:19 +0200)
committer
Daniel Vetter
<
[email protected]
>
Wed, 10 May 2017 18:06:41 +0000
(20:06 +0200)
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.
v3: Use uninitialized_var() (Chris).
Fixes: 0564654340e2 ("drm/i915: Acquire uncore.lock over intel_uncore_wait_for_register()")
Cc: Chris Wilson <
[email protected]
>
Cc: Michal Wajdeczko <
[email protected]
>
Cc: Joonas Lahtinen <
[email protected]
>
Cc: Tvrtko Ursulin <
[email protected]
>
Cc: Daniel Vetter <
[email protected]
>
Cc: Jani Nikula <
[email protected]
>
Reviewed-by: Chris Wilson <
[email protected]
>
Signed-off-by: Daniel Vetter <
[email protected]
>
Link:
http://patchwork.freedesktop.org/patch/msgid/
[email protected]
drivers/gpu/drm/i915/intel_uncore.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/intel_uncore.c
b/drivers/gpu/drm/i915/intel_uncore.c
index 2c628df6d9d53bb803b5721800a1adfa0570a9e6..08d7d08438c03d307fd437ecc71c51b5c4a2c57c 100644
(file)
--- a/
drivers/gpu/drm/i915/intel_uncore.c
+++ b/
drivers/gpu/drm/i915/intel_uncore.c
@@
-1610,7
+1610,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
uninitialized_var(reg_value)
;
#define done (((reg_value = I915_READ_FW(reg)) & mask) == value)
int ret;
@@
-1621,7
+1621,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)