summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_mocs.c
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2023-04-15 01:08:33 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-20 02:33:13 +0300
commite3ec5e75911b04b5e9ce67907024d7c5d9a6cb99 (patch)
treed61c8e49a09b31874c092d25ca76456ec83673cc /drivers/gpu/drm/xe/xe_mocs.c
parent9bc252522dbb0e6c34e9e0e26a599fa28555d907 (diff)
downloadlinux-e3ec5e75911b04b5e9ce67907024d7c5d9a6cb99.tar.xz
drm/xe: Set default MOCS value for cs instructions
CS instructions that dont have a explicit MOCS field will use this default MOCS value. To do this, it was necessary to initialize part of the mocs earlier and add new function that loads another array of rtp entries set during run-time. This is still missing to handle of mocs read for platforms with HAS_L3_CCS_READ(aka PVC). v2: - move to xe_hw_engine.c - remove CMD_CCTL auxiliary macros v3: - rebased Bspec: 45826 Cc: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_mocs.c')
-rw-r--r--drivers/gpu/drm/xe/xe_mocs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_mocs.c b/drivers/gpu/drm/xe/xe_mocs.c
index f2ceecd536ed..0d07811a573f 100644
--- a/drivers/gpu/drm/xe/xe_mocs.c
+++ b/drivers/gpu/drm/xe/xe_mocs.c
@@ -518,6 +518,15 @@ static void init_l3cc_table(struct xe_gt *gt,
}
}
+void xe_mocs_init_early(struct xe_gt *gt)
+{
+ struct xe_mocs_info table;
+
+ get_mocs_settings(gt->xe, &table);
+ gt->mocs.uc_index = table.uc_index;
+ gt->mocs.wb_index = table.wb_index;
+}
+
void xe_mocs_init(struct xe_gt *gt)
{
struct xe_mocs_info table;
@@ -528,8 +537,6 @@ void xe_mocs_init(struct xe_gt *gt)
*/
flags = get_mocs_settings(gt->xe, &table);
mocs_dbg(&gt->xe->drm, "flag:0x%x\n", flags);
- gt->mocs.uc_index = table.uc_index;
- gt->mocs.wb_index = table.wb_index;
if (flags & HAS_GLOBAL_MOCS)
__init_mocs_table(gt, &table, GLOBAL_MOCS(0).reg);