Skip to content

Commit

Permalink
drm/i915: Clear per-engine fault register as early as possible
Browse files Browse the repository at this point in the history
From gen6, the hardware tracks address lookup failures and we should
clear those registers upon startup to prevent false positives. However,
this was happening before we have the engines defined (intel_uncore_init())
and the for_each_engine loop was just a nop. The earliest we can call
this is inside intel_engines_init_mmio().

Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171111004448.12360-1-michel.thierry@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Michel Thierry authored and Chris Wilson committed Nov 13, 2017
1 parent dab9178 commit ce453b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/intel_engine_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ int intel_engines_init_mmio(struct drm_i915_private *dev_priv)

device_info->num_rings = hweight32(mask);

i915_check_and_clear_faults(dev_priv);

return 0;

cleanup:
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/intel_uncore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,8 +1420,6 @@ void intel_uncore_init(struct drm_i915_private *dev_priv)

iosf_mbi_register_pmic_bus_access_notifier(
&dev_priv->uncore.pmic_bus_access_nb);

i915_check_and_clear_faults(dev_priv);
}

void intel_uncore_fini(struct drm_i915_private *dev_priv)
Expand Down

0 comments on commit ce453b3

Please sign in to comment.