drm/i915/gt: Flush ongoing retires during wait_for_idle
Synchronise with any background retires and parking we may have spawned, so that all requests are accounted for. Closes: https://gitlab.freedesktop.org/drm/intel/issues/878 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Andi Shyti <andi.shyti@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200102231604.1669010-1-chris@chris-wilson.co.uk
This commit is contained in:
@@ -95,16 +95,17 @@ static void __intel_wakeref_put_work(struct work_struct *wrk)
|
||||
void __intel_wakeref_init(struct intel_wakeref *wf,
|
||||
struct intel_runtime_pm *rpm,
|
||||
const struct intel_wakeref_ops *ops,
|
||||
struct lock_class_key *key)
|
||||
struct intel_wakeref_lockclass *key)
|
||||
{
|
||||
wf->rpm = rpm;
|
||||
wf->ops = ops;
|
||||
|
||||
__mutex_init(&wf->mutex, "wakeref", key);
|
||||
__mutex_init(&wf->mutex, "wakeref.mutex", &key->mutex);
|
||||
atomic_set(&wf->count, 0);
|
||||
wf->wakeref = 0;
|
||||
|
||||
INIT_WORK(&wf->work, __intel_wakeref_put_work);
|
||||
lockdep_init_map(&wf->work.lockdep_map, "wakeref.work", &key->work, 0);
|
||||
}
|
||||
|
||||
int intel_wakeref_wait_for_idle(struct intel_wakeref *wf)
|
||||
|
Reference in New Issue
Block a user