[Intel-gfx] [PATCH] drm/i915: Squelch overzealous uncore reset WARN_ON

Chris Wilson chris at chris-wilson.co.uk
Thu Feb 5 02:29:38 PST 2015


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 at intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala at 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

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list