* [PATCH] drm/i915: make forcewake work again [not found] <1343808372.3047.1.camel@dabdike.int.hansenpartnership.com> @ 2012-08-06 19:31 ` Ben Widawsky 2012-08-07 17:56 ` [Intel-gfx] " Ben Widawsky 0 siblings, 1 reply; 2+ messages in thread From: Ben Widawsky @ 2012-08-06 19:31 UTC (permalink / raw) To: Intel GFX, James Bottomley, dri-devel Cc: Rafael J. Wysocki, Greg Kroah-Hartman, Ben Widawsky, linux-pm 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@ffwll.ch> 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@bwidawsk.net> --- 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 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: make forcewake work again 2012-08-06 19:31 ` [PATCH] drm/i915: make forcewake work again Ben Widawsky @ 2012-08-07 17:56 ` Ben Widawsky 0 siblings, 0 replies; 2+ messages in thread From: Ben Widawsky @ 2012-08-07 17:56 UTC (permalink / raw) To: Ben Widawsky Cc: Rafael J. Wysocki, linux-pm, Greg Kroah-Hartman, Intel GFX, dri-devel, James Bottomley On Mon, 6 Aug 2012 12:31:31 -0700 Ben Widawsky <ben@bwidawsk.net> wrote: > 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@ffwll.ch> > 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@bwidawsk.net> > --- > 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) > { Quick followup for anyone paying attention. The sympon and fix are both reproducible. I've sent relevant info to Daniel to sift through the crap. -- Ben Widawsky, Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-07 17:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1343808372.3047.1.camel@dabdike.int.hansenpartnership.com>
2012-08-06 19:31 ` [PATCH] drm/i915: make forcewake work again Ben Widawsky
2012-08-07 17:56 ` [Intel-gfx] " Ben Widawsky
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox