[PATCH 2/5] drm/xe/mocs: Be explicit when logging number of entries
Lucas De Marchi
lucas.demarchi at intel.com
Wed Feb 28 06:10:45 UTC 2024
Make sure to log if number of entries are l3cc or mocs so it doesn't
depend on the context. Also the warn-once in __init_mocs_table()
is more a sanity check that should be done as the first thing in that
function, so move it up.
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
drivers/gpu/drm/xe/xe_mocs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_mocs.c b/drivers/gpu/drm/xe/xe_mocs.c
index 001e4301c639d..bdb755b963238 100644
--- a/drivers/gpu/drm/xe/xe_mocs.c
+++ b/drivers/gpu/drm/xe/xe_mocs.c
@@ -470,7 +470,7 @@ static void __init_mocs_table(struct xe_gt *gt,
unsigned int i;
u32 mocs;
- mocs_dbg(>_to_xe(gt)->drm, "entries:%d\n", info->n_entries);
+ mocs_dbg(>_to_xe(gt)->drm, "mocs entries: %d\n", info->n_entries);
drm_WARN_ONCE(&xe->drm, !info->unused_entries_index,
"Unused entries index should have been defined\n");
for (i = 0; i < info->n_entries; i++) {
@@ -510,7 +510,8 @@ static void init_l3cc_table(struct xe_gt *gt,
unsigned int i;
u32 l3cc;
- mocs_dbg(>_to_xe(gt)->drm, "entries:%d\n", info->n_entries);
+ mocs_dbg(>_to_xe(gt)->drm, "l3cc entries: %d\n", info->n_entries);
+
for (i = 0; i < (info->n_entries + 1) / 2; i++) {
l3cc = l3cc_combine(get_entry_l3cc(info, 2 * i),
get_entry_l3cc(info, 2 * i + 1));
--
2.43.0
More information about the Intel-xe
mailing list