Skip to content

Commit ce15563

Browse files
unerligelucasdemarchi
authored andcommitted
drm/xe: Save the gt pointer in lrc and drop the tile
Save the gt pointer in the lrc so that it can used for gt based helpers. Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://lore.kernel.org/r/20250509161159.2173069-7-umesh.nerlige.ramappa@intel.com (cherry picked from commit 741d3ef) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent 66c8f7b commit ce15563

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
@@ -864,7 +864,7 @@ static void *empty_lrc_data(struct xe_hw_engine *hwe)
864864

865865
static void xe_lrc_set_ppgtt(struct xe_lrc *lrc, struct xe_vm *vm)
866866
{
867-
u64 desc = xe_vm_pdp4_descriptor(vm, lrc->tile);
867+
u64 desc = xe_vm_pdp4_descriptor(vm, gt_to_tile(lrc->gt));
868868

869869
xe_lrc_write_ctx_reg(lrc, CTX_PDP0_UDW, upper_32_bits(desc));
870870
xe_lrc_write_ctx_reg(lrc, CTX_PDP0_LDW, lower_32_bits(desc));
@@ -896,6 +896,7 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
896896
int err;
897897

898898
kref_init(&lrc->refcount);
899+
lrc->gt = gt;
899900
lrc->flags = 0;
900901
lrc_size = ring_size + xe_gt_lrc_size(gt, hwe->class);
901902
if (xe_gt_has_indirect_ring_state(gt))
@@ -914,7 +915,6 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
914915
return PTR_ERR(lrc->bo);
915916

916917
lrc->size = lrc_size;
917-
lrc->tile = gt_to_tile(hwe->gt);
918918
lrc->ring.size = ring_size;
919919
lrc->ring.tail = 0;
920920
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)