[PATCH 11/18] gvt-write

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 1 16:45:19 UTC 2021


---
 drivers/gpu/drm/i915/gvt/cmd_parser.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index 3fea967ee817..6b8eb9b92bdd 100644
--- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
+++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
@@ -2982,23 +2982,16 @@ static int shadow_indirect_ctx(struct intel_shadow_wa_ctx *wa_ctx)
 		goto put_obj;
 	}
 
-	i915_gem_object_lock(obj, NULL);
-	ret = i915_gem_object_set_to_cpu_domain(obj, false);
-	i915_gem_object_unlock(obj);
-	if (ret) {
-		gvt_vgpu_err("failed to set shadow indirect ctx to CPU\n");
-		goto unmap_src;
-	}
-
 	ret = copy_gma_to_hva(workload->vgpu,
-				workload->vgpu->gtt.ggtt_mm,
-				guest_gma, guest_gma + ctx_size,
-				map);
+			      workload->vgpu->gtt.ggtt_mm,
+			      guest_gma, guest_gma + ctx_size,
+			      map);
 	if (ret < 0) {
 		gvt_vgpu_err("fail to copy guest indirect ctx\n");
 		goto unmap_src;
 	}
 
+	i915_gem_object_flush_map(obj);
 	wa_ctx->indirect_ctx.obj = obj;
 	wa_ctx->indirect_ctx.shadow_va = map;
 	return 0;
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list