summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2015-02-05 17:45:42 +0200
committerJani Nikula <jani.nikula@intel.com>2015-02-09 14:35:49 +0200
commit3225b2f95dbb9981be9e2002e49cd8abf0d8d01a (patch)
tree6682204cd1cc362820b27da51ad6b285366dd174 /drivers
parentebbc7546d2099c94ff2ea940ae5ce740e512a66d (diff)
downloadlinux-stable-3225b2f95dbb9981be9e2002e49cd8abf0d8d01a.tar.gz
linux-stable-3225b2f95dbb9981be9e2002e49cd8abf0d8d01a.tar.bz2
linux-stable-3225b2f95dbb9981be9e2002e49cd8abf0d8d01a.zip
drm/i915: Squelch overzealous uncore reset WARN_ON
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> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> [Jani: add comment above WARN_ON as suggested by Chris] Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_uncore.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 76b60a3538b2..c47a3baa53d5 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,9 @@ static void intel_uncore_fw_domains_init(struct drm_device *dev)
fw_domain_init(dev_priv, FW_DOMAIN_ID_RENDER,
FORCEWAKE, FORCEWAKE_ACK);
}
+
+ /* All future platforms are expected to require complex power gating */
+ WARN_ON(dev_priv->uncore.fw_domains == 0);
}
void intel_uncore_init(struct drm_device *dev)