Skip to content

Commit 37aa19f

Browse files
committed
drm/xe: Add ring address to LRC snapshot
The ring is currently in LRC BO but this may change going forward. Include the ring address in the snapshot protecting again any future changes. v2: - s/ring_desc/ring_addr (Jonathan) Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241114022522.1951351-3-matthew.brost@intel.com
1 parent 1030479 commit 37aa19f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/gpu/drm/xe/xe_lrc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,6 +1636,7 @@ struct xe_lrc_snapshot *xe_lrc_snapshot_capture(struct xe_lrc *lrc)
16361636
xe_vm_get(lrc->bo->vm);
16371637

16381638
snapshot->context_desc = xe_lrc_ggtt_addr(lrc);
1639+
snapshot->ring_addr = __xe_lrc_ring_ggtt_addr(lrc);
16391640
snapshot->indirect_context_desc = xe_lrc_indirect_ring_ggtt_addr(lrc);
16401641
snapshot->head = xe_lrc_ring_head(lrc);
16411642
snapshot->tail.internal = lrc->ring.tail;
@@ -1693,6 +1694,8 @@ void xe_lrc_snapshot_print(struct xe_lrc_snapshot *snapshot, struct drm_printer
16931694
return;
16941695

16951696
drm_printf(p, "\tHW Context Desc: 0x%08x\n", snapshot->context_desc);
1697+
drm_printf(p, "\tHW Ring address: 0x%08x\n",
1698+
snapshot->ring_addr);
16961699
drm_printf(p, "\tHW Indirect Ring State: 0x%08x\n",
16971700
snapshot->indirect_context_desc);
16981701
drm_printf(p, "\tLRC Head: (memory) %u\n", snapshot->head);

drivers/gpu/drm/xe/xe_lrc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ struct xe_lrc_snapshot {
2525
unsigned long lrc_size, lrc_offset;
2626

2727
u32 context_desc;
28+
u32 ring_addr;
2829
u32 indirect_context_desc;
2930
u32 head;
3031
struct {

0 commit comments

Comments
 (0)