Skip to content

Commit 08c7c12

Browse files
committed
drm/i915/migrate: fix offset calculation
Ensure we add the engine base only after we calculate the qword offset into the PTE window. Signed-off-by: Matthew Auld <[email protected]> Cc: Thomas Hellström <[email protected]> Cc: Ramalingam C <[email protected]> Reviewed-by: Ramalingam C <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 8eb7fcc commit 08c7c12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/gt/intel_migrate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,10 @@ static int emit_pte(struct i915_request *rq,
279279
GEM_BUG_ON(GRAPHICS_VER(rq->engine->i915) < 8);
280280

281281
/* Compute the page directory offset for the target address range */
282-
offset += (u64)rq->engine->instance << 32;
283282
offset >>= 12;
284283
offset *= sizeof(u64);
285284
offset += 2 * CHUNK_SZ;
285+
offset += (u64)rq->engine->instance << 32;
286286

287287
cs = intel_ring_begin(rq, 6);
288288
if (IS_ERR(cs))

0 commit comments

Comments
 (0)