[PATCH] drm/i915: make forcewake work again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While trying to track down the power regression, I noticed that on my
SNB I had more severe problems, ie. forcewake seemed to never happen
once i915 was loaded. After a bit of bisection, I tracked the bad commit
to:

commit 7b0cfee1a24efdfe0235bac62e53f686fe8a8e24
Merge: 9756fe3 6b16351
Author: Daniel Vetter <daniel.vetter@xxxxxxxx>
Date:   Mon Jun 25 19:06:12 2012 +0200

    Merge tag 'v3.5-rc4' into drm-intel-next-queued

I changed the macro to the inline statement to debug a little better and
noticed that the problem went away. It's a bit embarrassing, but I can't
figure out what is wrong with the old macro.

In any case, I think this warrants further review.

Signed-off-by: Ben Widawsky <ben@xxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_drv.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index ff569cc..a859169 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1020,10 +1020,13 @@ MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL and additional rights");
 
 /* We give fast paths for the really cool registers */
-#define NEEDS_FORCE_WAKE(dev_priv, reg) \
-	((HAS_FORCE_WAKE((dev_priv)->dev)) && \
-	 ((reg) < 0x40000) &&            \
-	 ((reg) != FORCEWAKE))
+static inline bool NEEDS_FORCE_WAKE(struct drm_i915_private *dev_priv,
+				    u32 reg)
+{
+	return (HAS_FORCE_WAKE(dev_priv->dev)) &&
+		(reg < 0x40000) &&
+		(reg != FORCEWAKE);
+}
 
 static bool IS_DISPLAYREG(u32 reg)
 {
-- 
1.7.11.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux