diff mbox

drm/i915: Squelch overzealous uncore reset WARN_ON

Message ID 1423131671-25970-1-git-send-email-mika.kuoppala@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kuoppala Feb. 5, 2015, 10:21 a.m. UTC
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.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88911
Tested-by: Ding Heng <hengx.ding@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/intel_uncore.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Chris Wilson Feb. 5, 2015, 10:29 a.m. UTC | #1
On Thu, Feb 05, 2015 at 12:21:11PM +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.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88911
> Tested-by: Ding Heng <hengx.ding@intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>

Imo, here we should just

if (dev_priv->uncore.fw_domains == 0)
  return;

then it clarifies that we are allowed to call this code everywhere. To
address the issue you raise we should move the WARN_ON into the
uncore_init. If we have more counter-examples in the future, we may
regret adding the WARN, but in the meantime it will help remind us to
add the forcewake handling code.
-Chris
Shuang He Feb. 5, 2015, 5:52 p.m. UTC | #2
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 5716
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV              +1                 282/283              283/283
ILK              +3                 316/319              319/319
SNB                                  322/346              322/346
IVB                 -1              382/384              381/384
BYT                                  296/296              296/296
HSW                                  425/428              425/428
BDW                                  318/333              318/333
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 PNV  igt_gen3_render_linear_blits      FAIL(2, M7)CRASH(1, M23)PASS(4, M25M23)      PASS(1, M25)
*ILK  igt_drv_suspend_debugfs-reader      DMESG_WARN(2, M26M37)      PASS(1, M37)
*ILK  igt_drv_suspend_forcewake      DMESG_WARN(4, M26M37)      PASS(1, M37)
*ILK  igt_gem_workarounds_suspend-resume      DMESG_WARN(2, M26M37)      PASS(1, M37)
 IVB  igt_gem_pwrite_pread_snooped-pwrite-blt-cpu_mmap-performance      DMESG_WARN(2, M34)PASS(5, M21M34)      DMESG_WARN(1, M21)
Note: You need to pay more attention to line start with '*'
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 76b60a3..bbee962 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -166,6 +166,9 @@  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;
 
+	if (INTEL_INFO(dev_priv->dev)->gen <= 5)
+		return;
+
 	WARN_ON(dev_priv->uncore.fw_domains == 0);
 
 	for_each_fw_domain_mask(d, fw_domains, dev_priv, id)