drm/radeon: add a force flush to delay work when radeon
authorjsg <jsg@openbsd.org>
Fri, 16 Sep 2022 02:22:45 +0000 (02:22 +0000)
committerjsg <jsg@openbsd.org>
Fri, 16 Sep 2022 02:22:45 +0000 (02:22 +0000)
From Zhenneng Li
5a7a5b2edac4b05abd744eeaebda46d9dacd952d in linux 5.15.y/5.15.68
f461950fdc374a3ada5a63c669d997de4600dffe in mainline linux

sys/dev/pci/drm/radeon/radeon_device.c

index c1a537b..de12207 100644 (file)
@@ -1657,6 +1657,9 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,
                if (r) {
                        /* delay GPU reset to resume */
                        radeon_fence_driver_force_completion(rdev, i);
+               } else {
+                       /* finish executing delayed work */
+                       flush_delayed_work(&rdev->fence_drv[i].lockup_work);
                }
        }