From: José Roberto de Souza Date: Wed, 29 Jun 2022 13:47:21 +0000 (-0700) Subject: drm/i915: Drain freed object after suspend display X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=87a7d5350c67aca513dc0a80f696d5583430d594;p=linux.git drm/i915: Drain freed object after suspend display Display is turned off by i915_drm_suspend() during the suspend procedure, removing the last reference of some gem objects that were used by display. The issue is that those objects are only actually freed when mm.free_work executed and that can happen very late in the suspend process causing issues. So here draining all freed objects released by display fixing suspend issues. Signed-off-by: José Roberto de Souza Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20220629134721.48375-1-jose.souza@intel.com --- diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 2bd45e51d3b02..a67f20710978e 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1163,6 +1163,8 @@ static int i915_drm_suspend(struct drm_device *dev) enable_rpm_wakeref_asserts(&dev_priv->runtime_pm); + i915_gem_drain_freed_objects(dev_priv); + return 0; }