[Intel-gfx] [PATCH v5 6/9] drm/i915/gt: offset handling for multiple copy engines

Ramalingam C ramalingam.c at intel.com
Mon Mar 21 22:44:56 UTC 2022


Handle the src and dst chunk offsets for different instances of the copy
engines.

Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
---
 drivers/gpu/drm/i915/gt/intel_migrate.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index 39a5f8ae664d..5f6341f91622 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -614,6 +614,9 @@ static int emit_copy(struct i915_request *rq,
 	u32 instance = rq->engine->instance;
 	u32 *cs;
 
+	src_offset += (u64)rq->engine->instance << 32;
+	dst_offset += (u64)rq->engine->instance << 32;
+
 	cs = intel_ring_begin(rq, ver >= 8 ? 10 : 6);
 	if (IS_ERR(cs))
 		return PTR_ERR(cs);
-- 
2.20.1



More information about the Intel-gfx mailing list