forked from Minki/linux
drm/i915: Catch non-existent registers in find_fw_domain
Add WARN_ON to find_fw_domain to registers related to uninitialized hardware. v2: - Print the uninitialized domains and register (Chris) Cc: Imre Deak <imre.deak@intel.com> Cc: Wang Elaine <elaine.wang@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/1481120559-17413-1-git-send-email-joonas.lahtinen@linux.intel.com
This commit is contained in:
parent
73f67aa8cc
commit
991914274b
@ -625,7 +625,14 @@ find_fw_domain(struct drm_i915_private *dev_priv, u32 offset)
|
|||||||
dev_priv->uncore.fw_domains_table_entries,
|
dev_priv->uncore.fw_domains_table_entries,
|
||||||
fw_range_cmp);
|
fw_range_cmp);
|
||||||
|
|
||||||
return entry ? entry->domains : 0;
|
if (!entry)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
WARN(entry->domains & ~dev_priv->uncore.fw_domains,
|
||||||
|
"Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n",
|
||||||
|
entry->domains & ~dev_priv->uncore.fw_domains, offset);
|
||||||
|
|
||||||
|
return entry->domains;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user