diff options
author | Dave Gordon <david.s.gordon@intel.com> | 2014-11-18 15:07:21 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-12-03 03:35:11 -0500 |
commit | d65621c496a2afe6c6724cbd7150e2ec60b42f13 (patch) | |
tree | ef09257b1c43306ddf94cfa3c552e96fb451aee9 | |
parent | 57e215135f8ad7519fb079a0234e91a94bddd2f9 (diff) |
drm/i915: Don't read 'HEAD' MMIO register in LRC mode
The logical ring code was updating the software ring 'head' value
by reading the hardware 'HEAD' register. In LRC mode, this is not
valid as the hardware is not necessarily executing the same context
that is being processed by the software. Thus reading the h/w HEAD
could put an unrelated (undefined, effectively random) value into
the s/w 'head' -- A Bad Thing for the free space calculations.
Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/intel_lrc.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 047d8f065b99..03b5c04b6ee1 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c | |||
@@ -986,7 +986,6 @@ static int logical_ring_wait_for_space(struct intel_ringbuffer *ringbuf, | |||
986 | end = jiffies + 60 * HZ; | 986 | end = jiffies + 60 * HZ; |
987 | 987 | ||
988 | do { | 988 | do { |
989 | ringbuf->head = I915_READ_HEAD(ring); | ||
990 | ringbuf->space = intel_ring_space(ringbuf); | 989 | ringbuf->space = intel_ring_space(ringbuf); |
991 | if (ringbuf->space >= bytes) { | 990 | if (ringbuf->space >= bytes) { |
992 | ret = 0; | 991 | ret = 0; |