mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 09:41:54 +09:00
drm/i915/gvt: To check whether workload scan and shadow has mutex hold
The function workload scan and shadow have to hold the drm.struct_mutex before called. To avoid misusing of this function, add a lockdep assert in it. Signed-off-by: Ping Gao <ping.a.gao@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
This commit is contained in:
@@ -201,6 +201,8 @@ int intel_gvt_scan_and_shadow_workload(struct intel_vgpu_workload *workload)
|
||||
struct intel_vgpu *vgpu = workload->vgpu;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_held(&dev_priv->drm.struct_mutex);
|
||||
|
||||
if (workload->shadowed)
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user