Skip to content

Commit fe7879e

Browse files
unerligegregkh
authored andcommitted
drm/xe: Save the gt pointer in lrc and drop the tile
[ Upstream commit ce15563 ] Save the gt pointer in the lrc so that it can used for gt based helpers. Signed-off-by: Umesh Nerlige Ramappa <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit 741d3ef) Signed-off-by: Lucas De Marchi <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 089e980 commit fe7879e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/gpu/drm/xe/xe_lrc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ static void *empty_lrc_data(struct xe_hw_engine *hwe)
874874

875875
static void xe_lrc_set_ppgtt(struct xe_lrc *lrc, struct xe_vm *vm)
876876
{
877-
u64 desc = xe_vm_pdp4_descriptor(vm, lrc->tile);
877+
u64 desc = xe_vm_pdp4_descriptor(vm, gt_to_tile(lrc->gt));
878878

879879
xe_lrc_write_ctx_reg(lrc, CTX_PDP0_UDW, upper_32_bits(desc));
880880
xe_lrc_write_ctx_reg(lrc, CTX_PDP0_LDW, lower_32_bits(desc));
@@ -905,6 +905,7 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
905905
int err;
906906

907907
kref_init(&lrc->refcount);
908+
lrc->gt = gt;
908909
lrc->flags = 0;
909910
lrc_size = ring_size + xe_gt_lrc_size(gt, hwe->class);
910911
if (xe_gt_has_indirect_ring_state(gt))
@@ -923,7 +924,6 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
923924
return PTR_ERR(lrc->bo);
924925

925926
lrc->size = lrc_size;
926-
lrc->tile = gt_to_tile(hwe->gt);
927927
lrc->ring.size = ring_size;
928928
lrc->ring.tail = 0;
929929
lrc->ctx_timestamp = 0;

drivers/gpu/drm/xe/xe_lrc_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ struct xe_lrc {
2525
/** @size: size of lrc including any indirect ring state page */
2626
u32 size;
2727

28-
/** @tile: tile which this LRC belongs to */
29-
struct xe_tile *tile;
28+
/** @gt: gt which this LRC belongs to */
29+
struct xe_gt *gt;
3030

3131
/** @flags: LRC flags */
3232
#define XE_LRC_FLAG_INDIRECT_RING_STATE 0x1

0 commit comments

Comments
 (0)