[Intel-gfx] [PATCH] drm/i915: Organize HSW and BDW Forcewake MT Ack.
Rodrigo Vivi
rodrigo.vivi at gmail.com
Fri Sep 26 20:27:50 CEST 2014
oh true. Please just ignore it...
On Fri, Sep 26, 2014 at 11:12 AM, Ville Syrjälä <
ville.syrjala at linux.intel.com> wrote:
> On Fri, Sep 26, 2014 at 01:15:26PM -0400, Rodrigo Vivi wrote:
> > 0x130040 is actually a LCPLL_CTL and never was a Forcewake MT Ack.
> > The fixed value was introduced but the wrong one was never removed.
> > So let's clean the code and definitions a bit.
>
> NAK. 0x130040 is the forcewake MT ack on IVB.
>
> >
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_reg.h | 3 +--
> > drivers/gpu/drm/i915/intel_uncore.c | 13 ++++---------
> > 2 files changed, 5 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h
> b/drivers/gpu/drm/i915/i915_reg.h
> > index 15c0eaa..edd5485 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -5512,7 +5512,7 @@ enum punit_power_well {
> > #define FORCEWAKE_ACK_VLV 0x1300b4
> > #define FORCEWAKE_MEDIA_VLV 0x1300b8
> > #define FORCEWAKE_ACK_MEDIA_VLV 0x1300bc
> > -#define FORCEWAKE_ACK_HSW 0x130044
> > +#define FORCEWAKE_MT_ACK 0x130044
> > #define FORCEWAKE_ACK 0x130090
> > #define VLV_GTLC_WAKE_CTRL 0x130090
> > #define VLV_GTLC_RENDER_CTX_EXISTS (1 << 25)
> > @@ -5527,7 +5527,6 @@ enum punit_power_well {
> > #define FORCEWAKE_MT 0xa188 /*
> multi-threaded */
> > #define FORCEWAKE_KERNEL 0x1
> > #define FORCEWAKE_USER 0x2
> > -#define FORCEWAKE_MT_ACK 0x130040
> > #define ECOBUS 0xa180
> > #define FORCEWAKE_MT_ENABLE (1<<5)
> > #define VLV_SPAREG2H 0xA194
> > diff --git a/drivers/gpu/drm/i915/intel_uncore.c
> b/drivers/gpu/drm/i915/intel_uncore.c
> > index 918b761..a38c670 100644
> > --- a/drivers/gpu/drm/i915/intel_uncore.c
> > +++ b/drivers/gpu/drm/i915/intel_uncore.c
> > @@ -99,14 +99,8 @@ static void __gen7_gt_force_wake_mt_reset(struct
> drm_i915_private *dev_priv)
> > static void __gen7_gt_force_wake_mt_get(struct drm_i915_private
> *dev_priv,
> > int fw_engine)
> > {
> > - u32 forcewake_ack;
> > -
> > - if (IS_HASWELL(dev_priv->dev) || IS_BROADWELL(dev_priv->dev))
> > - forcewake_ack = FORCEWAKE_ACK_HSW;
> > - else
> > - forcewake_ack = FORCEWAKE_MT_ACK;
> > -
> > - if (wait_for_atomic((__raw_i915_read32(dev_priv, forcewake_ack) &
> FORCEWAKE_KERNEL) == 0,
> > + if (wait_for_atomic((__raw_i915_read32(dev_priv, FORCEWAKE_MT_ACK)
> > + & FORCEWAKE_KERNEL) == 0,
> > FORCEWAKE_ACK_TIMEOUT_MS))
> > DRM_ERROR("Timed out waiting for forcewake old ack to
> clear.\n");
> >
> > @@ -115,7 +109,8 @@ static void __gen7_gt_force_wake_mt_get(struct
> drm_i915_private *dev_priv,
> > /* something from same cacheline, but !FORCEWAKE_MT */
> > __raw_posting_read(dev_priv, ECOBUS);
> >
> > - if (wait_for_atomic((__raw_i915_read32(dev_priv, forcewake_ack) &
> FORCEWAKE_KERNEL),
> > + if (wait_for_atomic((__raw_i915_read32(dev_priv, FORCEWAKE_MT_ACK)
> > + & FORCEWAKE_KERNEL),
> > FORCEWAKE_ACK_TIMEOUT_MS))
> > DRM_ERROR("Timed out waiting for forcewake to ack
> request.\n");
> >
> > --
> > 1.9.3
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Ville Syrjälä
> Intel OTC
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
--
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140926/44de20a0/attachment.html>
More information about the Intel-gfx
mailing list