Patch "drm/i915/gvt: fix the usage of ww lock in gvt scheduler." has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/i915/gvt: fix the usage of ww lock in gvt scheduler.

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-i915-gvt-fix-the-usage-of-ww-lock-in-gvt-schedul.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a8606a48630f274b304124633fa27658db45c93b
Author: Zhi A Wang <zhi.wang.linux2@xxxxxxxxx>
Date:   Thu Aug 26 14:38:34 2021 +0000

    drm/i915/gvt: fix the usage of ww lock in gvt scheduler.
    
    [ Upstream commit d168cd797982db9db617113644c87b8f5f3cf27e ]
    
    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 <zhenyuw@xxxxxxxxxxxxxxx>
    Signed-off-by: Zhi A Wang <zhi.a.wang@xxxxxxxxx>
    Signed-off-by: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>
    Link: http://patchwork.freedesktop.org/patch/msgid/20210826143834.25410-1-zhi.a.wang@xxxxxxxxx
    Acked-by: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
index 734c37c5e347..527b59b86312 100644
--- a/drivers/gpu/drm/i915/gvt/scheduler.c
+++ b/drivers/gpu/drm/i915/gvt/scheduler.c
@@ -576,7 +576,7 @@ static int prepare_shadow_batch_buffer(struct intel_vgpu_workload *workload)
 
 			/* 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 @@ static int prepare_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
 		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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux