During Runtime suspend/resume, GuC is allocating/destroying client vmas
that needs RPM reference and it leads to recursion. So RPM suspend/resume
will not work currently with GuC enabled. Clarify this TODO through
comment in i915_gem_runtime_suspend/resume while invoking uC
suspend/resume functions.

Signed-off-by: Sagar Arun Kamble <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Michal Wajdeczko <[email protected]>
Cc: MichaƂ Winiarski <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
---
 drivers/gpu/drm/i915/i915_gem.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9e257e2..bcf3ca5 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2060,6 +2060,13 @@ int i915_gem_runtime_suspend(struct drm_i915_private 
*dev_priv)
 
        mutex_lock(&dev_priv->drm.struct_mutex);
 
+       /*
+        * TODO: Note that currently GuC submission enable/disable will
+        * lead to GuC execbuf client vma allocation/free that
+        * in turn involves RPM get/put hence this path will hang.
+        * Once we update guc_submission_disable to only destroy doorbell
+        * and not free/unmap client vmas, this will be fixed.
+        */
        ret = intel_uc_suspend(dev_priv);
        if (ret)
                goto out_unlock;
@@ -2113,6 +2120,13 @@ void i915_gem_runtime_resume(struct drm_i915_private 
*dev_priv)
        i915_gem_init_swizzling(dev_priv);
        i915_gem_restore_fences(dev_priv);
 
+       /*
+        * TODO: Note that currently GuC submission enable/disable will
+        * lead to GuC execbuf client vma allocation/free that
+        * in turn involves RPM get/put hence this path will hang.
+        * Once we update guc_submission_enable to only acquire doorbell
+        * and not allocate/map client vmas, this will be fixed.
+        */
        intel_uc_runtime_resume(dev_priv);
 
        mutex_unlock(&dev_priv->drm.struct_mutex);
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to