Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87e919d7 authored by Ping Gao's avatar Ping Gao Committed by Zhenyu Wang
Browse files

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: default avatarPing Gao <ping.a.gao@intel.com>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
parent d0302e74
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;