From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rodrigo Vivi Subject: Re: [PATCH v2 01/25] drm/i915: vlv: clean up GTLC wake control/status register macros Date: Thu, 24 Apr 2014 18:04:53 -0300 Message-ID: References: <1397496286-29649-1-git-send-email-imre.deak@intel.com> <1397496286-29649-2-git-send-email-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BA906E6DD for ; Thu, 24 Apr 2014 14:04:55 -0700 (PDT) Received: by mail-ve0-f179.google.com with SMTP id db12so3698543veb.10 for ; Thu, 24 Apr 2014 14:04:53 -0700 (PDT) In-Reply-To: <1397496286-29649-2-git-send-email-imre.deak@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Imre Deak Cc: intel-gfx List-Id: intel-gfx@lists.freedesktop.org Apparently Ville already Reviewed this one, but since I was checking the doc and it was right feel free to also use: Reviewed-by: Rodrigo Vivi same for next 2 patches. On Mon, Apr 14, 2014 at 2:24 PM, Imre Deak wrote: > These will be needed by the upcoming VLV RPM helpers. > > Signed-off-by: Imre Deak > --- > drivers/gpu/drm/i915/i915_gem.c | 5 +++-- > drivers/gpu/drm/i915/i915_reg.h | 10 ++++++++-- > 2 files changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index 8f5ffab..af8493a 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -4459,8 +4459,9 @@ int i915_gem_init(struct drm_device *dev) > > if (IS_VALLEYVIEW(dev)) { > /* VLVA0 (potential hack), BIOS isn't actually waking us */ > - I915_WRITE(VLV_GTLC_WAKE_CTRL, 1); > - if (wait_for((I915_READ(VLV_GTLC_PW_STATUS) & 1) == 1, 10)) > + I915_WRITE(VLV_GTLC_WAKE_CTRL, VLV_GTLC_ALLOWWAKEREQ); > + if (wait_for((I915_READ(VLV_GTLC_PW_STATUS) & > + VLV_GTLC_ALLOWWAKEACK), 10)) > DRM_DEBUG_DRIVER("allow wake ack timed out\n"); > } > > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h > index 8f84555..ee768f0 100644 > --- a/drivers/gpu/drm/i915/i915_reg.h > +++ b/drivers/gpu/drm/i915/i915_reg.h > @@ -4996,9 +4996,15 @@ enum punit_power_well { > #define FORCEWAKE_ACK_HSW 0x130044 > #define FORCEWAKE_ACK 0x130090 > #define VLV_GTLC_WAKE_CTRL 0x130090 > +#define VLV_GTLC_RENDER_CTX_EXISTS (1 << 25) > +#define VLV_GTLC_MEDIA_CTX_EXISTS (1 << 24) > +#define VLV_GTLC_ALLOWWAKEREQ (1 << 0) > + > #define VLV_GTLC_PW_STATUS 0x130094 > -#define VLV_GTLC_PW_RENDER_STATUS_MASK 0x80 > -#define VLV_GTLC_PW_MEDIA_STATUS_MASK 0x20 > +#define VLV_GTLC_ALLOWWAKEACK (1 << 0) > +#define VLV_GTLC_ALLOWWAKEERR (1 << 1) > +#define VLV_GTLC_PW_MEDIA_STATUS_MASK (1 << 5) > +#define VLV_GTLC_PW_RENDER_STATUS_MASK (1 << 7) > #define FORCEWAKE_MT 0xa188 /* multi-threaded */ > #define FORCEWAKE_KERNEL 0x1 > #define FORCEWAKE_USER 0x2 > -- > 1.8.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Rodrigo Vivi Blog: http://blog.vivi.eng.br