Skip to content

Commit

Permalink
drm/i915/migrate: fix offset calculation
Browse files Browse the repository at this point in the history
[ 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 <[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]
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
matt-auld authored and gregkh committed Jan 12, 2023
1 parent a3d1e6f commit 8b25a52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gt/intel_migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ static int emit_pte(struct i915_request *rq,
GEM_BUG_ON(GRAPHICS_VER(rq->engine->i915) < 8);

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

cs = intel_ring_begin(rq, 6);
if (IS_ERR(cs))
Expand Down

0 comments on commit 8b25a52

Please sign in to comment.