Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit d168cd7

Browse files
Zhi A Wangzhenyw
Zhi A Wang
authored andcommitted
drm/i915/gvt: fix the usage of ww lock in gvt scheduler.
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: 67f1120 ("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]>
1 parent 71de496 commit d168cd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/i915/gvt/scheduler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ static int prepare_shadow_batch_buffer(struct intel_vgpu_workload *workload)
576576

577577
/* No one is going to touch shadow bb from now on. */
578578
i915_gem_object_flush_map(bb->obj);
579-
i915_gem_object_unlock(bb->obj);
579+
i915_gem_ww_ctx_fini(&ww);
580580
}
581581
}
582582
return 0;
@@ -630,7 +630,7 @@ static int prepare_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
630630
return ret;
631631
}
632632

633-
i915_gem_object_unlock(wa_ctx->indirect_ctx.obj);
633+
i915_gem_ww_ctx_fini(&ww);
634634

635635
/* FIXME: we are not tracking our pinned VMA leaving it
636636
* up to the core to fix up the stray pin_count upon

0 commit comments

Comments
 (0)