diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-22 06:18:09 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-22 06:18:09 +0000 |
commit | 0b91040955ca6275cca4f2e8f8b38d0c248b002f (patch) | |
tree | 0fc7f40f28c88ae38c471009f6944f35dd6ac22f /sys/dev/pci | |
parent | 42339faf23ce5dc145a4d6d257043cd499884c4b (diff) |
drm/i915/gt: Force the GT reset on shutdown
From Chris Wilson
5c4f75b93e2263ba5594a3eaa51745786a8565ce in linux 5.7.y/5.7.17
7c4541a37bbbf83c0f16f779e85eb61d9348ed29 in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/i915/gt/intel_gt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915/gt/intel_gt.c b/sys/dev/pci/drm/i915/gt/intel_gt.c index 89e6f4880ec..07ca6579f0d 100644 --- a/sys/dev/pci/drm/i915/gt/intel_gt.c +++ b/sys/dev/pci/drm/i915/gt/intel_gt.c @@ -656,6 +656,11 @@ void intel_gt_driver_unregister(struct intel_gt *gt) void intel_gt_driver_release(struct intel_gt *gt) { struct i915_address_space *vm; + intel_wakeref_t wakeref; + + /* Scrub all HW state upon release */ + with_intel_runtime_pm(gt->uncore->rpm, wakeref) + __intel_gt_reset(gt, ALL_ENGINES); vm = fetch_and_zero(>->vm); if (vm) /* FIXME being called twice on error paths :( */ |