[Intel-gfx] [PATCH] drm/i915: Fix forcewake active domain tracking
Chris Wilson
chris at chris-wilson.co.uk
Thu Mar 9 21:12:16 UTC 2017
On Thu, Mar 09, 2017 at 03:52:50PM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> In commit 003342a50021 ("drm/i915: Keep track of active
> forcewake domains in a bitmask") I forgot to adjust the
> newly introduce fw_domains_active state across reset.
>
> This caused the assert_forcewakes_inactive to trigger
> during suspend and resume if there were user held
> forcewakes.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Fixes: 003342a50021 ("drm/i915: Keep track of active forcewake domains in a bitmask")
> Testcase: igt/drv_suspend/forcewake
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: "Paneri, Praveen" <praveen.paneri at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter at intel.com>
> Cc: Jani Nikula <jani.nikula at linux.intel.com>
> Cc: intel-gfx at lists.freedesktop.org
> Cc: v4.10+ <stable at vger.kernel.org>
> ---
> drivers/gpu/drm/i915/intel_uncore.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 2a3f35c30501..efa040847d69 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -302,22 +302,21 @@ static void intel_uncore_forcewake_reset(struct drm_i915_private *dev_priv,
> WARN_ON(active_domains);
>
> fw = dev_priv->uncore.fw_domains_active;
> - if (fw)
> - dev_priv->uncore.funcs.force_wake_put(dev_priv, fw);
I see. On ilk-, funcs.force_wake_put/_get are NULL, so we need to keep
the if (fw) guard.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list