aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index d0eb2280d8d9..77e729d4e4f0 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1135,7 +1135,16 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n)
1135 } 1135 }
1136 1136
1137 trace_i915_ring_wait_begin(ring); 1137 trace_i915_ring_wait_begin(ring);
1138 end = jiffies + 3 * HZ; 1138 if (drm_core_check_feature(dev, DRIVER_GEM))
1139 /* With GEM the hangcheck timer should kick us out of the loop,
1140 * leaving it early runs the risk of corrupting GEM state (due
1141 * to running on almost untested codepaths). But on resume
1142 * timers don't work yet, so prevent a complete hang in that
1143 * case by choosing an insanely large timeout. */
1144 end = jiffies + 60 * HZ;
1145 else
1146 end = jiffies + 3 * HZ;
1147
1139 do { 1148 do {
1140 ring->head = I915_READ_HEAD(ring); 1149 ring->head = I915_READ_HEAD(ring);
1141 ring->space = ring_space(ring); 1150 ring->space = ring_space(ring);