Skip to content

Commit f4d51b6

Browse files
committed
drm/xe/lrc: Add table with LRC layout
Add a table to document the LRC's BO layout to make it easier to visualize how each region stacks on top of each other. Reviewed-by: Tvrtko Ursulin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lucas De Marchi <[email protected]>
1 parent aded26c commit f4d51b6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

drivers/gpu/drm/xe/xe_lrc.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,30 @@
4343
#define LRC_INDIRECT_RING_STATE_SIZE SZ_4K
4444
#define LRC_WA_BB_SIZE SZ_4K
4545

46+
/*
47+
* Layout of the LRC and associated data allocated as
48+
* lrc->bo:
49+
*
50+
* Region Size
51+
* +============================+=================================+ <- __xe_lrc_ring_offset()
52+
* | Ring | ring_size, see |
53+
* | | xe_lrc_init() |
54+
* +============================+=================================+ <- __xe_lrc_pphwsp_offset()
55+
* | PPHWSP (includes SW state) | 4K |
56+
* +----------------------------+---------------------------------+ <- __xe_lrc_regs_offset()
57+
* | Engine Context Image | n * 4K, see |
58+
* | | xe_gt_lrc_size() |
59+
* +----------------------------+---------------------------------+ <- __xe_lrc_indirect_ring_offset()
60+
* | Indirect Ring State Page | 0 or 4k, see |
61+
* | | XE_LRC_FLAG_INDIRECT_RING_STATE |
62+
* +============================+=================================+ <- __xe_lrc_indirect_ctx_offset()
63+
* | Indirect Context Page | 0 or 4k, see |
64+
* | | XE_LRC_FLAG_INDIRECT_CTX |
65+
* +============================+=================================+ <- __xe_lrc_wa_bb_offset()
66+
* | WA BB Per Ctx | 4k |
67+
* +============================+=================================+ <- xe_bo_size(lrc->bo)
68+
*/
69+
4670
static struct xe_device *
4771
lrc_to_xe(struct xe_lrc *lrc)
4872
{

0 commit comments

Comments
 (0)