|
@@ -4990,8 +4990,7 @@ void __i915_gem_object_release_unless_active(struct drm_i915_gem_object *obj)
|
|
|
|
|
|
void i915_gem_sanitize(struct drm_i915_private *i915)
|
|
|
{
|
|
|
- struct intel_engine_cs *engine;
|
|
|
- enum intel_engine_id id;
|
|
|
+ int err;
|
|
|
|
|
|
GEM_TRACE("\n");
|
|
|
|
|
@@ -5017,14 +5016,11 @@ void i915_gem_sanitize(struct drm_i915_private *i915)
|
|
|
* it may impact the display and we are uncertain about the stability
|
|
|
* of the reset, so this could be applied to even earlier gen.
|
|
|
*/
|
|
|
+ err = -ENODEV;
|
|
|
if (INTEL_GEN(i915) >= 5 && intel_has_gpu_reset(i915))
|
|
|
- WARN_ON(intel_gpu_reset(i915, ALL_ENGINES));
|
|
|
-
|
|
|
- /* Reset the submission backend after resume as well as the GPU reset */
|
|
|
- for_each_engine(engine, i915, id) {
|
|
|
- if (engine->reset.reset)
|
|
|
- engine->reset.reset(engine, NULL);
|
|
|
- }
|
|
|
+ err = WARN_ON(intel_gpu_reset(i915, ALL_ENGINES));
|
|
|
+ if (!err)
|
|
|
+ intel_engines_sanitize(i915);
|
|
|
|
|
|
intel_uncore_forcewake_put(i915, FORCEWAKE_ALL);
|
|
|
intel_runtime_pm_put(i915);
|