Commit 0aaee4cc authored by Pei Zhang's avatar Pei Zhang Committed by Zhenyu Wang

drm/i915/gvt: check workload empty before real scan

This patch will fix warning log print during command scan caused by
empty workload (ring head equals tail). This patch avoid going into
real scan process if workload is empty. It's guest's responsibility
to make sure if an empty workload is proper to submit to HW.

[v2] modify the patch description. It's a fix, not a w/a.
Signed-off-by: default avatarPei Zhang <pei.zhang@intel.com>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
parent a3614a86
...@@ -2537,7 +2537,8 @@ static int scan_workload(struct intel_vgpu_workload *workload) ...@@ -2537,7 +2537,8 @@ static int scan_workload(struct intel_vgpu_workload *workload)
s.rb_va = workload->shadow_ring_buffer_va; s.rb_va = workload->shadow_ring_buffer_va;
s.workload = workload; s.workload = workload;
if (bypass_scan_mask & (1 << workload->ring_id)) if ((bypass_scan_mask & (1 << workload->ring_id)) ||
gma_head == gma_tail)
return 0; return 0;
ret = ip_gma_set(&s, gma_head); ret = ip_gma_set(&s, gma_head);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment