[PATCH 1/2] drm/i915/gvt: Remove one assumption in indirect/per BB ctx scan
Zhi Wang
zhi.wang.linux at gmail.com
Wed Oct 18 18:30:08 UTC 2017
Previously GVT-g assumes the guest has to use indirect/per BB ctx scan at
the same time. But this is actually not correct.
Fixes: be1da7070aea ("drm/i915/gvt: vGPU command scanner")
Signed-off-by: Zhi Wang <zhi.a.wang at intel.com>
---
drivers/gpu/drm/i915/gvt/cmd_parser.c | 3 ++-
drivers/gpu/drm/i915/gvt/scheduler.c | 2 --
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index 272d6f9..f3c30af 100644
--- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
+++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
@@ -2790,7 +2790,8 @@ int intel_gvt_scan_and_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
return ret;
}
- combine_wa_ctx(wa_ctx);
+ if (wa_ctx->per_ctx.guest_gma)
+ combine_wa_ctx(wa_ctx);
ret = scan_wa_ctx(wa_ctx);
if (ret) {
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
index 4acfcfc..7e88c00 100644
--- a/drivers/gpu/drm/i915/gvt/scheduler.c
+++ b/drivers/gpu/drm/i915/gvt/scheduler.c
@@ -1261,8 +1261,6 @@ intel_vgpu_create_workload(struct intel_vgpu *vgpu, int ring_id,
CACHELINE_BYTES;
workload->wa_ctx.per_ctx.guest_gma =
per_ctx & PER_CTX_ADDR_MASK;
-
- WARN_ON(workload->wa_ctx.indirect_ctx.size && !(per_ctx & 0x1));
}
gvt_dbg_el("workload %p ring id %d head %x tail %x start %x ctl %x\n",
--
2.7.4
More information about the intel-gvt-dev
mailing list