Patch "drm/i915: Replace WARN inside I915_READ64_2x32 with retry loop" has been added to the 4.1-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/i915: Replace WARN inside I915_READ64_2x32 with retry loop
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-replace-warn-inside-i915_read64_2x32-with-retry-loop.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
ee0a227b7ac6e75f28e10269f81c7ec6eb600952Mon Sep 17 00:00:00 2001
From: Chris Wilson <[email protected]>
Date: Wed, 15 Jul 2015 09:50:42 +0100
Subject: drm/i915: Replace WARN inside I915_READ64_2x32 with retry loop
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Chris Wilson <[email protected]>
commit ee0a227b7ac6e75f28e10269f81c7ec6eb600952 upstream.
Since we may conceivably encounter situations where the upper part of the 64bit register changes between reads, for example when a timestamp counter overflows, change the WARN into a retry loop.
--- drivers/gpu/drm/i915/i915_drv.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +8 -9
@@ -3190,15 +3190,14 @@ int intel_freq_opcode(struct drm_i915_pr#define I915_READ64 (reg) dev_priv->uncore.funcs.mmio_readq(dev_priv, (reg), true)#define I915_READ64_2x32 (lower_reg, upper_reg) ({ \ - u32 upper = I915_READ(upper_reg); \ - u32 lower = I915_READ(lower_reg); \ - u32 tmp = I915_READ(upper_reg); \ - if (upper != tmp) { \ - upper = tmp; \ - lower = I915_READ(lower_reg); \ - WARN_ON(I915_READ(upper_reg) != upper); \ - } \ - (u64)upper << 32 | lower; }) + u32 upper, lower, tmp; \ + tmp = I915_READ(upper_reg); \ + do { \ + upper = tmp; \ + lower = I915_READ(lower_reg); \ + tmp = I915_READ(upper_reg); \ + } while (upper != tmp); \ + (u64)upper << 32 | lower; })#define POSTING_READ (reg) (void)I915_READ_NOTRACE(reg)#define POSTING_READ16 (reg) (void)I915_READ16_NOTRACE(reg)
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/drm-i915-declare-the-swizzling-unknown-for-l-shaped-configurations.patch queue-4.1/drm-i915-replace-warn-inside-i915_read64_2x32-with-retry-loop.patch