From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 14/20] drm/i915: add media well to VLV force wake routines v2
Date: Tue, 19 Mar 2013 13:53:33 +0200 [thread overview]
Message-ID: <20130319115333.GJ4469@intel.com> (raw)
In-Reply-To: <1362768363-3710-14-git-send-email-jbarnes@virtuousgeek.org>
On Fri, Mar 08, 2013 at 10:45:57AM -0800, Jesse Barnes wrote:
> We could split this out into a separate routine at some point as an
> optimization.
>
> v2: use FORCEWAKE_KERNEL (Ville)
>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
With the understanding that no one gets to blame me if the magic
same cacheline register trick turns out to be necessary after all ;)
> ---
> drivers/gpu/drm/i915/i915_reg.h | 2 ++
> drivers/gpu/drm/i915/intel_pm.c | 12 +++++++++---
> 2 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 1877d0e..07a1333 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -4266,6 +4266,8 @@
> #define FORCEWAKE 0xA18C
> #define FORCEWAKE_VLV 0x1300b0
> #define FORCEWAKE_ACK_VLV 0x1300b4
> +#define FORCEWAKE_MEDIA_VLV 0x1300b8
> +#define FORCEWAKE_ACK_MEDIA_VLV 0x1300bc
> #define FORCEWAKE_ACK_HSW 0x130044
> #define FORCEWAKE_ACK 0x130090
> #define VLV_GTLC_WAKE_CTRL 0x130090
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index d2499eb..70eab45 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4415,10 +4415,16 @@ static void vlv_force_wake_get(struct drm_i915_private *dev_priv)
> DRM_ERROR("Timed out waiting for forcewake old ack to clear.\n");
>
> I915_WRITE_NOTRACE(FORCEWAKE_VLV, _MASKED_BIT_ENABLE(FORCEWAKE_KERNEL));
> + I915_WRITE_NOTRACE(FORCEWAKE_MEDIA_VLV, _MASKED_BIT_ENABLE(FORCEWAKE_KERNEL));
>
> if (wait_for_atomic((I915_READ_NOTRACE(FORCEWAKE_ACK_VLV) & FORCEWAKE_KERNEL),
> FORCEWAKE_ACK_TIMEOUT_MS))
> - DRM_ERROR("Timed out waiting for forcewake to ack request.\n");
> + DRM_ERROR("Timed out waiting for GT to ack forcewake request.\n");
> +
> + if (wait_for_atomic((I915_READ_NOTRACE(FORCEWAKE_ACK_MEDIA_VLV) &
> + FORCEWAKE_KERNEL),
> + FORCEWAKE_ACK_TIMEOUT_MS))
> + DRM_ERROR("Timed out waiting for media to ack forcewake request.\n");
>
> __gen6_gt_wait_for_thread_c0(dev_priv);
> }
> @@ -4426,8 +4432,8 @@ static void vlv_force_wake_get(struct drm_i915_private *dev_priv)
> static void vlv_force_wake_put(struct drm_i915_private *dev_priv)
> {
> I915_WRITE_NOTRACE(FORCEWAKE_VLV, _MASKED_BIT_DISABLE(FORCEWAKE_KERNEL));
> - /* something from same cacheline, but !FORCEWAKE_VLV */
> - POSTING_READ(FORCEWAKE_ACK_VLV);
> + I915_WRITE_NOTRACE(FORCEWAKE_MEDIA_VLV, _MASKED_BIT_DISABLE(FORCEWAKE_KERNEL));
> + /* The below doubles as a POSTING_READ */
> gen6_gt_check_fifodbg(dev_priv);
> }
>
> --
> 1.7.10.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-03-19 11:53 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 18:45 [PATCH 01/20] drm/i915: sprite support for ValleyView v2 Jesse Barnes
2013-03-08 18:45 ` [PATCH 02/20] drm/i915: add sprite assertion function for VLV Jesse Barnes
2013-03-08 18:45 ` [PATCH 03/20] drm/i915: add constant alpha support to sprite ioctl Jesse Barnes
2013-03-19 8:42 ` Daniel Vetter
2013-03-19 17:57 ` Jesse Barnes
2013-03-20 16:32 ` Ville Syrjälä
2013-03-20 17:16 ` Daniel Vetter
2013-03-08 18:45 ` [PATCH 04/20] drm/i915: update VLV PLL and DPIO code v6 Jesse Barnes
2013-03-08 18:45 ` [PATCH 05/20] drm/i915/dp: fix up VLV DP handling v2 Jesse Barnes
2013-03-08 18:45 ` [PATCH 06/20] drm/i915: panel power sequencing for VLV eDP v2 Jesse Barnes
2013-03-19 20:49 ` Daniel Vetter
2013-03-08 18:45 ` [PATCH 07/20] drm/i915: add more VLV IDs Jesse Barnes
2013-03-08 18:45 ` [PATCH 08/20] drm/i915: fix WaDisablePSDDualDispatchEnable on VLV v2 Jesse Barnes
2013-03-08 18:45 ` [PATCH 09/20] drm/i915: add power context allocation and setup " Jesse Barnes
2013-03-08 20:16 ` Ben Widawsky
2013-03-11 23:40 ` Daniel Vetter
2013-03-12 0:01 ` Chris Wilson
2013-03-08 18:45 ` [PATCH 10/20] drm/i915: allow force wake at init time " Jesse Barnes
2013-03-19 6:38 ` Ville Syrjälä
2013-03-19 8:38 ` Daniel Vetter
2013-03-08 18:45 ` [PATCH 11/20] drm/i915: set conservative clock gating values " Jesse Barnes
2013-03-08 18:45 ` [PATCH 12/20] drm/i915: fix VLV limits and m/n/p calculations v2 Jesse Barnes
2013-03-08 18:45 ` [PATCH 13/20] drm/i915: add Punit read/write routines for VLV Jesse Barnes
2013-03-20 18:38 ` Ben Widawsky
2013-03-08 18:45 ` [PATCH 14/20] drm/i915: add media well to VLV force wake routines v2 Jesse Barnes
2013-03-19 11:53 ` Ville Syrjälä [this message]
2013-03-19 19:15 ` Daniel Vetter
2013-03-08 18:45 ` [PATCH 15/20] drm/i915: turbo & RC6 support for VLV v2 Jesse Barnes
2013-03-19 22:27 ` Ben Widawsky
2013-03-19 22:35 ` Jesse Barnes
2013-03-19 23:38 ` Ben Widawsky
2013-03-20 16:32 ` Ben Widawsky
2013-03-08 18:45 ` [PATCH 16/20] drm/i915: DSPFW and BLC regs are in the display offset range Jesse Barnes
2013-03-08 18:46 ` [PATCH 17/20] drm/i915: don't use plane pipe select on VLV Jesse Barnes
2013-03-19 11:59 ` Ville Syrjälä
2013-03-19 19:05 ` Daniel Vetter
2013-03-08 18:46 ` [PATCH 18/20] drm/i915: use VLV DIP routines on VLV v2 Jesse Barnes
2013-03-19 19:23 ` Daniel Vetter
2013-03-08 18:46 ` [PATCH 19/20] drm/i915/dp: program VSwing and Preemphasis control settings on VLV Jesse Barnes
2013-03-19 19:30 ` Daniel Vetter
2013-03-08 18:46 ` [PATCH 20/20] drm/i915: VLV doesn't have HDMI on port C Jesse Barnes
2013-03-19 21:11 ` Daniel Vetter
2013-03-19 6:30 ` [PATCH 01/20] drm/i915: sprite support for ValleyView v2 Ville Syrjälä
2013-03-19 17:51 ` Jesse Barnes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130319115333.GJ4469@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jbarnes@virtuousgeek.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox