diff options
author | Imre Deak <imre.deak@intel.com> | 2017-02-24 09:32:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-18 01:11:45 -0400 |
commit | 8ac9915c3f86cc7fe6a6fab4e4a61d992b01db07 (patch) | |
tree | 399d982079071796c652729e92e57ccc1b601648 | |
parent | cf2586e60ede2217d7f53a0585e27e1cca693600 (diff) |
drm/i915/gen9: Increase PCODE request timeout to 50ms
commit d253371c4c2f5fc2d884ef25f64decd7549aff5a upstream.
After
commit 2c7d0602c815277f7cb7c932b091288710d8aba7
Author: Imre Deak <imre.deak@intel.com>
Date: Mon Dec 5 18:27:37 2016 +0200
drm/i915/gen9: Fix PCODE polling during CDCLK change notification
there is still one report of the CDCLK-change request timing out on a
KBL machine, see the Reference link. On that machine the maximum time
the request took to succeed was 34ms, so increase the timeout to 50ms.
v2:
- Change timeout from 100 to 50 ms to maintain the current 50 ms limit
for atomic waits in the driver. (Chris, Tvrtko)
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=99345
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1487946730-17162-1-git-send-email-imre.deak@intel.com
(cherry picked from commit 0129936ddda26afd5d9d207c4e86b2425952579f)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index e559a45ff1f7..86717fa61217 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -7960,10 +7960,10 @@ static bool skl_pcode_try_request(struct drm_i915_private *dev_priv, u32 mbox, | |||
7960 | * @timeout_base_ms: timeout for polling with preemption enabled | 7960 | * @timeout_base_ms: timeout for polling with preemption enabled |
7961 | * | 7961 | * |
7962 | * Keep resending the @request to @mbox until PCODE acknowledges it, PCODE | 7962 | * Keep resending the @request to @mbox until PCODE acknowledges it, PCODE |
7963 | * reports an error or an overall timeout of @timeout_base_ms+10 ms expires. | 7963 | * reports an error or an overall timeout of @timeout_base_ms+50 ms expires. |
7964 | * The request is acknowledged once the PCODE reply dword equals @reply after | 7964 | * The request is acknowledged once the PCODE reply dword equals @reply after |
7965 | * applying @reply_mask. Polling is first attempted with preemption enabled | 7965 | * applying @reply_mask. Polling is first attempted with preemption enabled |
7966 | * for @timeout_base_ms and if this times out for another 10 ms with | 7966 | * for @timeout_base_ms and if this times out for another 50 ms with |
7967 | * preemption disabled. | 7967 | * preemption disabled. |
7968 | * | 7968 | * |
7969 | * Returns 0 on success, %-ETIMEDOUT in case of a timeout, <0 in case of some | 7969 | * Returns 0 on success, %-ETIMEDOUT in case of a timeout, <0 in case of some |
@@ -7999,14 +7999,15 @@ int skl_pcode_request(struct drm_i915_private *dev_priv, u32 mbox, u32 request, | |||
7999 | * worst case) _and_ PCODE was busy for some reason even after a | 7999 | * worst case) _and_ PCODE was busy for some reason even after a |
8000 | * (queued) request and @timeout_base_ms delay. As a workaround retry | 8000 | * (queued) request and @timeout_base_ms delay. As a workaround retry |
8001 | * the poll with preemption disabled to maximize the number of | 8001 | * the poll with preemption disabled to maximize the number of |
8002 | * requests. Increase the timeout from @timeout_base_ms to 10ms to | 8002 | * requests. Increase the timeout from @timeout_base_ms to 50ms to |
8003 | * account for interrupts that could reduce the number of these | 8003 | * account for interrupts that could reduce the number of these |
8004 | * requests. | 8004 | * requests, and for any quirks of the PCODE firmware that delays |
8005 | * the request completion. | ||
8005 | */ | 8006 | */ |
8006 | DRM_DEBUG_KMS("PCODE timeout, retrying with preemption disabled\n"); | 8007 | DRM_DEBUG_KMS("PCODE timeout, retrying with preemption disabled\n"); |
8007 | WARN_ON_ONCE(timeout_base_ms > 3); | 8008 | WARN_ON_ONCE(timeout_base_ms > 3); |
8008 | preempt_disable(); | 8009 | preempt_disable(); |
8009 | ret = wait_for_atomic(COND, 10); | 8010 | ret = wait_for_atomic(COND, 50); |
8010 | preempt_enable(); | 8011 | preempt_enable(); |
8011 | 8012 | ||
8012 | out: | 8013 | out: |