diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2012-09-02 01:59:49 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-09-03 04:28:28 -0400 |
commit | 057d3860613813b2e8507bb932f9a523ad2cca2f (patch) | |
tree | b04d932c631a01b23b8341f419479be0c903c9fd /drivers/gpu/drm/i915/intel_pm.c | |
parent | 0cc2764cc4a4bd73df55f8893c871778cf7ddd0f (diff) |
drm/i915: Change forcewake timeout to 2ms
A designer familiar with the hardware has stated that the forcewake
timeout can theoretically be as high as a little over 1ms. Therefore we
modify our code to use 2ms (appropriate fudge and because we don't want
to round down).
Hopefully this can't prevent spurious timeouts.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Acked-by: Chris Wilson <chris@chris-wilson.oc.uk>
[danvet: again fix conflict with vlv patch.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index fd8d37f97a45..31e47387ab9c 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include "../../../platform/x86/intel_ips.h" | 31 | #include "../../../platform/x86/intel_ips.h" |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | 33 | ||
34 | #define FORCEWAKE_ACK_TIMEOUT_US 500 | 34 | #define FORCEWAKE_ACK_TIMEOUT_MS 2 |
35 | 35 | ||
36 | /* FBC, or Frame Buffer Compression, is a technique employed to compress the | 36 | /* FBC, or Frame Buffer Compression, is a technique employed to compress the |
37 | * framebuffer contents in-memory, aiming at reducing the required bandwidth | 37 | * framebuffer contents in-memory, aiming at reducing the required bandwidth |
@@ -3964,15 +3964,15 @@ static void __gen6_gt_force_wake_get(struct drm_i915_private *dev_priv) | |||
3964 | else | 3964 | else |
3965 | forcewake_ack = FORCEWAKE_ACK; | 3965 | forcewake_ack = FORCEWAKE_ACK; |
3966 | 3966 | ||
3967 | if (wait_for_atomic_us((I915_READ_NOTRACE(forcewake_ack) & 1) == 0, | 3967 | if (wait_for_atomic((I915_READ_NOTRACE(forcewake_ack) & 1) == 0, |
3968 | FORCEWAKE_ACK_TIMEOUT_US)) | 3968 | FORCEWAKE_ACK_TIMEOUT_MS)) |
3969 | DRM_ERROR("Timed out waiting for forcewake old ack to clear.\n"); | 3969 | DRM_ERROR("Timed out waiting for forcewake old ack to clear.\n"); |
3970 | 3970 | ||
3971 | I915_WRITE_NOTRACE(FORCEWAKE, 1); | 3971 | I915_WRITE_NOTRACE(FORCEWAKE, 1); |
3972 | POSTING_READ(FORCEWAKE); | 3972 | POSTING_READ(FORCEWAKE); |
3973 | 3973 | ||
3974 | if (wait_for_atomic_us((I915_READ_NOTRACE(forcewake_ack) & 1), | 3974 | if (wait_for_atomic((I915_READ_NOTRACE(forcewake_ack) & 1), |
3975 | FORCEWAKE_ACK_TIMEOUT_US)) | 3975 | FORCEWAKE_ACK_TIMEOUT_MS)) |
3976 | DRM_ERROR("Timed out waiting for forcewake to ack request.\n"); | 3976 | DRM_ERROR("Timed out waiting for forcewake to ack request.\n"); |
3977 | 3977 | ||
3978 | __gen6_gt_wait_for_thread_c0(dev_priv); | 3978 | __gen6_gt_wait_for_thread_c0(dev_priv); |
@@ -3987,15 +3987,15 @@ static void __gen6_gt_force_wake_mt_get(struct drm_i915_private *dev_priv) | |||
3987 | else | 3987 | else |
3988 | forcewake_ack = FORCEWAKE_MT_ACK; | 3988 | forcewake_ack = FORCEWAKE_MT_ACK; |
3989 | 3989 | ||
3990 | if (wait_for_atomic_us((I915_READ_NOTRACE(forcewake_ack) & 1) == 0, | 3990 | if (wait_for_atomic((I915_READ_NOTRACE(forcewake_ack) & 1) == 0, |
3991 | FORCEWAKE_ACK_TIMEOUT_US)) | 3991 | FORCEWAKE_ACK_TIMEOUT_MS)) |
3992 | DRM_ERROR("Timed out waiting for forcewake old ack to clear.\n"); | 3992 | DRM_ERROR("Timed out waiting for forcewake old ack to clear.\n"); |
3993 | 3993 | ||
3994 | I915_WRITE_NOTRACE(FORCEWAKE_MT, _MASKED_BIT_ENABLE(1)); | 3994 | I915_WRITE_NOTRACE(FORCEWAKE_MT, _MASKED_BIT_ENABLE(1)); |
3995 | POSTING_READ(FORCEWAKE_MT); | 3995 | POSTING_READ(FORCEWAKE_MT); |
3996 | 3996 | ||
3997 | if (wait_for_atomic_us((I915_READ_NOTRACE(forcewake_ack) & 1), | 3997 | if (wait_for_atomic((I915_READ_NOTRACE(forcewake_ack) & 1), |
3998 | FORCEWAKE_ACK_TIMEOUT_US)) | 3998 | FORCEWAKE_ACK_TIMEOUT_MS)) |
3999 | DRM_ERROR("Timed out waiting for forcewake to ack request.\n"); | 3999 | DRM_ERROR("Timed out waiting for forcewake to ack request.\n"); |
4000 | 4000 | ||
4001 | __gen6_gt_wait_for_thread_c0(dev_priv); | 4001 | __gen6_gt_wait_for_thread_c0(dev_priv); |
@@ -4075,14 +4075,14 @@ int __gen6_gt_wait_for_fifo(struct drm_i915_private *dev_priv) | |||
4075 | 4075 | ||
4076 | static void vlv_force_wake_get(struct drm_i915_private *dev_priv) | 4076 | static void vlv_force_wake_get(struct drm_i915_private *dev_priv) |
4077 | { | 4077 | { |
4078 | if (wait_for_atomic_us((I915_READ_NOTRACE(FORCEWAKE_ACK_VLV) & 1) == 0, | 4078 | if (wait_for_atomic((I915_READ_NOTRACE(FORCEWAKE_ACK_VLV) & 1) == 0, |
4079 | FORCEWAKE_ACK_TIMEOUT_US)) | 4079 | FORCEWAKE_ACK_TIMEOUT_MS)) |
4080 | DRM_ERROR("Timed out waiting for forcewake old ack to clear.\n"); | 4080 | DRM_ERROR("Timed out waiting for forcewake old ack to clear.\n"); |
4081 | 4081 | ||
4082 | I915_WRITE_NOTRACE(FORCEWAKE_VLV, _MASKED_BIT_ENABLE(1)); | 4082 | I915_WRITE_NOTRACE(FORCEWAKE_VLV, _MASKED_BIT_ENABLE(1)); |
4083 | 4083 | ||
4084 | if (wait_for_atomic_us((I915_READ_NOTRACE(FORCEWAKE_ACK_VLV) & 1), | 4084 | if (wait_for_atomic((I915_READ_NOTRACE(FORCEWAKE_ACK_VLV) & 1), |
4085 | FORCEWAKE_ACK_TIMEOUT_US)) | 4085 | FORCEWAKE_ACK_TIMEOUT_MS)) |
4086 | DRM_ERROR("Timed out waiting for forcewake to ack request.\n"); | 4086 | DRM_ERROR("Timed out waiting for forcewake to ack request.\n"); |
4087 | 4087 | ||
4088 | __gen6_gt_wait_for_thread_c0(dev_priv); | 4088 | __gen6_gt_wait_for_thread_c0(dev_priv); |