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:
Chris Wilson
2020-01-02 23:16:04 +00:00
parent 9dae9e5381
commit cdd280b1b9
3 changed files with 19 additions and 9 deletions

View File

@@ -44,12 +44,17 @@ struct intel_wakeref {
struct work_struct work;
};
struct intel_wakeref_lockclass {
struct lock_class_key mutex;
struct lock_class_key work;
};
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);
#define intel_wakeref_init(wf, rpm, ops) do { \
static struct lock_class_key __key; \
static struct intel_wakeref_lockclass __key; \
\
__intel_wakeref_init((wf), (rpm), (ops), &__key); \
} while (0)