From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Squelch overzealous uncore reset WARN_ON
Date: Mon, 09 Feb 2015 14:37:33 +0200 [thread overview]
Message-ID: <871tlzw99u.fsf@intel.com> (raw)
In-Reply-To: <20150205164307.GC12153@nuc-i3427.alporthouse.com>
On Thu, 05 Feb 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Thu, Feb 05, 2015 at 05:45:42PM +0200, Mika Kuoppala wrote:
>> We added this WARN_ON to guard against using uninitialized
>> forcewake domains. But forgot blissfully that not all
>> gens have forcewake domains in the first place.
>>
>> v2: Move WARN_ON to fw_domains_init (Chris)
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88911
>> Tested-by: Ding Heng <hengx.ding@intel.com> (v1)
>> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_uncore.c | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
>> index 76b60a3..e10bcfc 100644
>> --- a/drivers/gpu/drm/i915/intel_uncore.c
>> +++ b/drivers/gpu/drm/i915/intel_uncore.c
>> @@ -166,7 +166,8 @@ fw_domains_reset(struct drm_i915_private *dev_priv, enum forcewake_domains fw_do
>> struct intel_uncore_forcewake_domain *d;
>> enum forcewake_domain_id id;
>>
>> - WARN_ON(dev_priv->uncore.fw_domains == 0);
>> + if (dev_priv->uncore.fw_domains == 0)
>> + return;
>>
>> for_each_fw_domain_mask(d, fw_domains, dev_priv, id)
>> fw_domain_reset(d);
>> @@ -997,6 +998,9 @@ static void intel_uncore_fw_domains_init(struct drm_device *dev)
>> {
>> struct drm_i915_private *dev_priv = dev->dev_private;
>>
>> + if (INTEL_INFO(dev_priv->dev)->gen <= 5)
>> + return;
>> +
>> if (IS_GEN9(dev)) {
>> dev_priv->uncore.funcs.force_wake_get = fw_domains_get;
>> dev_priv->uncore.funcs.force_wake_put = fw_domains_put;
>> @@ -1069,6 +1073,8 @@ static void intel_uncore_fw_domains_init(struct drm_device *dev)
>> fw_domain_init(dev_priv, FW_DOMAIN_ID_RENDER,
>> FORCEWAKE, FORCEWAKE_ACK);
>> }
>> +
> Maybe: /* All future platforms are expected to require complex power gating */
>> + WARN_ON(dev_priv->uncore.fw_domains == 0);
>> }
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Pushed to drm-intel-next-fixes, thanks for the patch and review.
BR,
Jani.
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-02-09 12:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-05 10:21 [PATCH] drm/i915: Squelch overzealous uncore reset WARN_ON Mika Kuoppala
2015-02-05 10:29 ` Chris Wilson
2015-02-05 15:45 ` Mika Kuoppala
2015-02-05 16:43 ` Chris Wilson
2015-02-09 12:37 ` Jani Nikula [this message]
2015-02-07 9:31 ` shuang.he
2015-02-05 17:52 ` shuang.he
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=871tlzw99u.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@linux.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