Skip to content

Commit 8b25a52

Browse files
matt-auldgregkh
authored andcommitted
drm/i915/migrate: fix offset calculation
[ Upstream commit 08c7c12 ] Ensure we add the engine base only after we calculate the qword offset into the PTE window. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Ramalingam C <ramalingam.c@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211206112539.3149779-2-matthew.auld@intel.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a3d1e6f commit 8b25a52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)