Skip to contentSkip to conversation

drm/i915: drop the right force-wake engine in the vlv mmio funcs

PATCH New Daniel Vetter 1 participant 2 messages Nov 27, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915: drop the right force-wake engine in the vlv mmio funcs

This was fumbled in the conversion to per-engine forcewake.

---
 drivers/gpu/drm/i915/intel_uncore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_uncore.c +1 -1
index 97ae8bda7a1e..a7c6de7d6240 100644
@@ -496,7 +496,7 @@ vlv_read##x(struct drm_i915_private *dev_priv, off_t reg, bool trace) { \
 		val = __raw_i915_read##x(dev_priv, reg); \
 		if (--(*fwcount) == 0) \
 			(dev_priv)->uncore.funcs.force_wake_put(dev_priv, \
-							FORCEWAKE_ALL); \
+							fwengine); \
 	} else { \
 		val = __raw_i915_read##x(dev_priv, reg); \
 	} \
Signature · 1 line
1.8.4.3
#1 lore raw

PATCH 2/2 drm/i915: make sparse happy for the new vlv mmio read function

It doesn't like that we assign 0 to a pointer, it wants the real NULL.

On closer look that initialization is actually bogus, and the compiler can easily see that we never use it unitialized. So let's just drop this.

---
 drivers/gpu/drm/i915/intel_uncore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_uncore.c +1 -1
index a7c6de7d6240..d511e00095ac 100644
@@ -479,7 +479,7 @@ gen6_read##x(struct drm_i915_private *dev_priv, off_t reg, bool trace) { \
 static u##x \
 vlv_read##x(struct drm_i915_private *dev_priv, off_t reg, bool trace) { \
 	unsigned fwengine = 0; \
-	unsigned *fwcount = 0; \
+	unsigned *fwcount; \
 	REG_READ_HEADER(x); \
 	if (FORCEWAKE_VLV_RENDER_RANGE_OFFSET(reg)) {   \
 		fwengine = FORCEWAKE_RENDER;            \
Signature · 1 line
1.8.4.3