Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe/cri: Setup MOCS table

CRI has a new MOCS table, but uses the same general ops as other Xe2/Xe3
platforms.

Bspec: 71582
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Link: https://patch.msgid.link/20251021-cri-v1-3-bf11e61d9f49@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

authored by

Matt Roper and committed by
Lucas De Marchi
402377bb 5e0de2df

+26
+26
drivers/gpu/drm/xe/xe_mocs.c
··· 568 568 .dump = xe2_mocs_dump, 569 569 }; 570 570 571 + /* 572 + * Note that the "L3" and "L4" register fields actually control the L2 and L3 573 + * caches respectively on this platform. 574 + */ 575 + static const struct xe_mocs_entry xe3p_xpc_mocs_table[] = { 576 + /* Defer to PAT */ 577 + MOCS_ENTRY(0, XE2_L3_0_WB | L4_3_UC, 0), 578 + /* UC */ 579 + MOCS_ENTRY(1, IG_PAT | XE2_L3_3_UC | L4_3_UC, 0), 580 + /* L2 */ 581 + MOCS_ENTRY(2, IG_PAT | XE2_L3_0_WB | L4_3_UC, 0), 582 + /* L3 */ 583 + MOCS_ENTRY(3, IG_PAT | XE2_L3_3_UC | L4_0_WB, 0), 584 + /* L2 + L3 */ 585 + MOCS_ENTRY(4, IG_PAT | XE2_L3_0_WB | L4_0_WB, 0), 586 + }; 587 + 571 588 static unsigned int get_mocs_settings(struct xe_device *xe, 572 589 struct xe_mocs_info *info) 573 590 { ··· 593 576 memset(info, 0, sizeof(struct xe_mocs_info)); 594 577 595 578 switch (xe->info.platform) { 579 + case XE_CRESCENTISLAND: 580 + info->ops = &xe2_mocs_ops; 581 + info->table_size = ARRAY_SIZE(xe3p_xpc_mocs_table); 582 + info->table = xe3p_xpc_mocs_table; 583 + info->num_mocs_regs = XE2_NUM_MOCS_ENTRIES; 584 + info->uc_index = 1; 585 + info->wb_index = 4; 586 + info->unused_entries_index = 4; 587 + break; 596 588 case XE_NOVALAKE_S: 597 589 case XE_PANTHERLAKE: 598 590 case XE_LUNARLAKE: