]> Git Repo - linux.git/commitdiff
drm/i915/gvt: fix the usage of ww lock in gvt scheduler.
authorZhi A Wang <[email protected]>
Thu, 26 Aug 2021 14:38:34 +0000 (14:38 +0000)
committerZhenyu Wang <[email protected]>
Mon, 13 Sep 2021 13:59:31 +0000 (21:59 +0800)
As the APIs related to ww lock in i915 was changed recently, the usage of
ww lock in GVT-g scheduler needs to be changed accrodingly. We noticed a
deadlock when GVT-g scheduler submits the workload to i915. After some
investigation, it seems the way of how to use ww lock APIs has been
changed. Releasing a ww now requires a explicit i915_gem_ww_ctx_fini().

Fixes: 67f1120381df ("drm/i915/gvt: Introduce per object locking in GVT scheduler.")
Cc: Zhenyu Wang <[email protected]>
Signed-off-by: Zhi A Wang <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Acked-by: Zhenyu Wang <[email protected]>
drivers/gpu/drm/i915/gvt/scheduler.c

index 734c37c5e34743752538d20493b6b090bd8e1403..527b59b86312518306acd98974f5a39daeb74996 100644 (file)
@@ -576,7 +576,7 @@ retry:
 
                        /* No one is going to touch shadow bb from now on. */
                        i915_gem_object_flush_map(bb->obj);
-                       i915_gem_object_unlock(bb->obj);
+                       i915_gem_ww_ctx_fini(&ww);
                }
        }
        return 0;
@@ -630,7 +630,7 @@ retry:
                return ret;
        }
 
-       i915_gem_object_unlock(wa_ctx->indirect_ctx.obj);
+       i915_gem_ww_ctx_fini(&ww);
 
        /* FIXME: we are not tracking our pinned VMA leaving it
         * up to the core to fix up the stray pin_count upon
This page took 0.057486 seconds and 4 git commands to generate.