diff options
author | Du, Changbin | 2016-11-11 09:33:06 +0100 |
---|---|---|
committer | Zhenyu Wang | 2016-11-14 11:06:43 +0100 |
commit | 0427f06aec4222e0712b2efba1ac60ff56a1c336 (patch) | |
tree | 405d86dd8f7a560192e1d43694fb663dec6c50e5 /drivers/gpu/drm/i915/gvt/execlist.h | |
parent | drm/i915/gvt: emulate right behavior for tlb_control (diff) | |
download | kernel-qcow2-linux-0427f06aec4222e0712b2efba1ac60ff56a1c336.tar.gz kernel-qcow2-linux-0427f06aec4222e0712b2efba1ac60ff56a1c336.tar.xz kernel-qcow2-linux-0427f06aec4222e0712b2efba1ac60ff56a1c336.zip |
drm/i915/gvt: fix crash in vgpu_reset_execlist
We initiate vgpu->workload_q_head via for_each_engine
macro which may skip unavailable engines. So we should
follow this rule anywhere. The function
intel_vgpu_reset_execlist is not aware of this. Kernel
crash when touch a uninitiated vgpu->workload_q_head[x].
Let's fix it by using for_each_engine_masked and skip
unavailable engine ID. Meanwhile rename ring_bitmap to
general name engine_mask.
v2: remove unnecessary engine activation check (zhenyu)
Signed-off-by: Du, Changbin <changbin.du@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/execlist.h')
-rw-r--r-- | drivers/gpu/drm/i915/gvt/execlist.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/execlist.h b/drivers/gpu/drm/i915/gvt/execlist.h index 635f31c6dcc1..7eced40a1e30 100644 --- a/drivers/gpu/drm/i915/gvt/execlist.h +++ b/drivers/gpu/drm/i915/gvt/execlist.h @@ -183,6 +183,6 @@ int intel_vgpu_init_execlist(struct intel_vgpu *vgpu); int intel_vgpu_submit_execlist(struct intel_vgpu *vgpu, int ring_id); void intel_vgpu_reset_execlist(struct intel_vgpu *vgpu, - unsigned long ring_bitmap); + unsigned long engine_mask); #endif /*_GVT_EXECLIST_H_*/ |