mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-24 18:39:17 +07:00
drm/i915: Wait for engines to idle before retiring
In the next^W forthcoming patch, we will start to defer retiring the request from the engine list if it is still active on the submission backend. To preserve the semantics that after wait-for-idle completes the system is idle and fully retired, we need to therefore wait for the backends to idle before calling i915_retire_requests(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180627115334.16282-1-chris@chris-wilson.co.uk
This commit is contained in:
parent
67ca07e7ac
commit
a61b47f672
@ -3810,10 +3810,13 @@ int i915_gem_wait_for_idle(struct drm_i915_private *i915, unsigned int flags)
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = wait_for_engines(i915);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
i915_retire_requests(i915);
|
i915_retire_requests(i915);
|
||||||
GEM_BUG_ON(i915->gt.active_requests);
|
GEM_BUG_ON(i915->gt.active_requests);
|
||||||
|
|
||||||
return wait_for_engines(i915);
|
|
||||||
} else {
|
} else {
|
||||||
struct intel_engine_cs *engine;
|
struct intel_engine_cs *engine;
|
||||||
enum intel_engine_id id;
|
enum intel_engine_id id;
|
||||||
@ -3824,9 +3827,9 @@ int i915_gem_wait_for_idle(struct drm_i915_private *i915, unsigned int flags)
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __i915_gem_object_flush_for_display(struct drm_i915_gem_object *obj)
|
static void __i915_gem_object_flush_for_display(struct drm_i915_gem_object *obj)
|
||||||
|
Loading…
Reference in New Issue
Block a user