public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: Ben Widawsky <ben@bwidawsk.net>, Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] Revert "drm/i915/vlv: Remove check for Old Ack during forcewake"
Date: Fri, 07 Nov 2014 14:58:37 +0000	[thread overview]
Message-ID: <545CDE1D.9060506@intel.com> (raw)
In-Reply-To: <20141106140915.GC26941@phenom.ffwll.local>

On 06/11/14 14:09, Daniel Vetter wrote:
> On Wed, Nov 05, 2014 at 05:30:52PM +0200, Mika Kuoppala wrote:
>> This reverts commit 5cb13c07dae73380d8b3ddc792740487b8742938.
>>
>> While the relevance for WaRsDontPollForAckOnClearingFWBits is under
>> investigation, revert this as regression.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85684
>> Tested-by:   Tested-by: lu hua <huax.lu@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Cc: S, Deepak <deepak.s@intel.com>
>> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> 
> Queued for -next, thanks for the patch.
> -Daniel
> 

Hi,

while looking at the (semi-generic) force wake code in the function
gen6_gt_force_wake_get(), I noticed that if the platform doesn't provide
a low-level forcewake register-access function, then we omit the PM
get/put calls as well.

> void gen6_gt_force_wake_get(struct drm_i915_private *dev_priv, int fw_engine)
> {
>         unsigned long irqflags;
> 
>         if (!dev_priv->uncore.funcs.force_wake_get)
>                 return;
> 
>         intel_runtime_pm_get(dev_priv);
> 
>         /* Redirect to Gen9 specific routine */
>         if (IS_GEN9(dev_priv->dev))
>                 return gen9_force_wake_get(dev_priv, fw_engine);
> 
>         /* Redirect to VLV specific routine */
>         if (IS_VALLEYVIEW(dev_priv->dev))
>                 return vlv_force_wake_get(dev_priv, fw_engine);
> 
>         spin_lock_irqsave(&dev_priv->uncore.lock, irqflags);
>         if (dev_priv->uncore.forcewake_count++ == 0)
>                 dev_priv->uncore.funcs.force_wake_get(dev_priv, FORCEWAKE_ALL);
>         spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags);
> }

Does anyone know whether this is intentional, or just an accident of the
current implementation? Presumably we don't have any platforms where
this applies, but we is it plausible that some future device might want
the runtime PM effects without actually having h/w support
for forcewake?

Alternatively, why do we need the runtime PM calls in here? I can see
Paolo's commit "c8c8fb3 drm/i915: add some runtime PM get/put calls"
added lots of get/put pairs round various sequences of operations in
debugfs etc, so why do we also need them at this inner level? Is it just
to catch any cases where the caller should have (but didn't) deal with
runtime PM already?

Thanks,
Dave
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2014-11-07 14:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05  8:18 [PATCH] drm/i915: Wait old forcewake ack to clear on vlv Mika Kuoppala
2014-11-05  8:25 ` Chris Wilson
2014-11-05 15:13   ` Mika Kuoppala
2014-11-05  8:53 ` Ville Syrjälä
2014-11-05  9:26   ` S, Deepak
2014-11-05 10:13   ` Mika Kuoppala
2014-11-05 12:42     ` Daniel Vetter
2014-11-05 15:30       ` [PATCH] Revert "drm/i915/vlv: Remove check for Old Ack during forcewake" Mika Kuoppala
2014-11-06 14:09         ` Daniel Vetter
2014-11-07 14:58           ` Dave Gordon [this message]
2014-11-11 10:24             ` Daniel Vetter
2014-11-05 12:47     ` [PATCH] drm/i915: Wait old forcewake ack to clear on vlv S, Deepak

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=545CDE1D.9060506@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    /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