Lines Matching full:table
25 const struct drm_i915_mocs_entry *table; member
119 * entries will remain constant and the table will only be updated by
454 struct drm_i915_mocs_table *table) in get_mocs_settings() argument
458 memset(table, 0, sizeof(struct drm_i915_mocs_table)); in get_mocs_settings()
460 table->unused_entries_index = I915_MOCS_PTE; in get_mocs_settings()
462 table->size = ARRAY_SIZE(mtl_mocs_table); in get_mocs_settings()
463 table->table = mtl_mocs_table; in get_mocs_settings()
464 table->n_entries = MTL_NUM_MOCS_ENTRIES; in get_mocs_settings()
465 table->uc_index = 9; in get_mocs_settings()
466 table->unused_entries_index = 1; in get_mocs_settings()
468 table->size = ARRAY_SIZE(dg2_mocs_table); in get_mocs_settings()
469 table->table = dg2_mocs_table; in get_mocs_settings()
470 table->uc_index = 1; in get_mocs_settings()
471 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
472 table->unused_entries_index = 3; in get_mocs_settings()
474 table->size = ARRAY_SIZE(dg1_mocs_table); in get_mocs_settings()
475 table->table = dg1_mocs_table; in get_mocs_settings()
476 table->uc_index = 1; in get_mocs_settings()
477 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
478 table->uc_index = 1; in get_mocs_settings()
479 table->unused_entries_index = 5; in get_mocs_settings()
482 table->size = ARRAY_SIZE(tgl_mocs_table); in get_mocs_settings()
483 table->table = tgl_mocs_table; in get_mocs_settings()
484 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
485 table->uc_index = 3; in get_mocs_settings()
487 table->size = ARRAY_SIZE(gen12_mocs_table); in get_mocs_settings()
488 table->table = gen12_mocs_table; in get_mocs_settings()
489 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
490 table->uc_index = 3; in get_mocs_settings()
491 table->unused_entries_index = 2; in get_mocs_settings()
493 table->size = ARRAY_SIZE(icl_mocs_table); in get_mocs_settings()
494 table->table = icl_mocs_table; in get_mocs_settings()
495 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
497 table->size = ARRAY_SIZE(skl_mocs_table); in get_mocs_settings()
498 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
499 table->table = skl_mocs_table; in get_mocs_settings()
501 table->size = ARRAY_SIZE(broxton_mocs_table); in get_mocs_settings()
502 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
503 table->table = broxton_mocs_table; in get_mocs_settings()
506 "Platform that should have a MOCS table does not.\n"); in get_mocs_settings()
510 if (GEM_DEBUG_WARN_ON(table->size > table->n_entries)) in get_mocs_settings()
517 for (i = 0; i < table->size; i++) in get_mocs_settings()
518 if (GEM_DEBUG_WARN_ON(table->table[i].l3cc_value & in get_mocs_settings()
541 static u32 get_entry_control(const struct drm_i915_mocs_table *table, in get_entry_control() argument
544 if (index < table->size && table->table[index].used) in get_entry_control()
545 return table->table[index].control_value; in get_entry_control()
546 return table->table[table->unused_entries_index].control_value; in get_entry_control()
555 const struct drm_i915_mocs_table *table, in __init_mocs_table() argument
561 drm_WARN_ONCE(&uncore->i915->drm, !table->unused_entries_index, in __init_mocs_table()
563 for_each_mocs(mocs, table, i) in __init_mocs_table()
583 const struct drm_i915_mocs_table *table) in init_mocs_table() argument
585 __init_mocs_table(engine->uncore, table, mocs_offset(engine)); in init_mocs_table()
593 static u16 get_entry_l3cc(const struct drm_i915_mocs_table *table, in get_entry_l3cc() argument
596 if (index < table->size && table->table[index].used) in get_entry_l3cc()
597 return table->table[index].l3cc_value; in get_entry_l3cc()
598 return table->table[table->unused_entries_index].l3cc_value; in get_entry_l3cc()
615 const struct drm_i915_mocs_table *table) in init_l3cc_table() argument
622 for_each_l3cc(l3cc, table, i) in init_l3cc_table()
632 struct drm_i915_mocs_table table; in intel_mocs_init_engine() local
638 flags = get_mocs_settings(engine->i915, &table); in intel_mocs_init_engine()
644 init_mocs_table(engine, &table); in intel_mocs_init_engine()
647 init_l3cc_table(engine->gt, &table); in intel_mocs_init_engine()
657 struct drm_i915_mocs_table table; in intel_set_mocs_index() local
659 get_mocs_settings(gt->i915, &table); in intel_set_mocs_index()
660 gt->mocs.uc_index = table.uc_index; in intel_set_mocs_index()
662 gt->mocs.wb_index = table.wb_index; in intel_set_mocs_index()
667 struct drm_i915_mocs_table table; in intel_mocs_init() local
673 flags = get_mocs_settings(gt->i915, &table); in intel_mocs_init()
675 __init_mocs_table(gt->uncore, &table, global_mocs_offset()); in intel_mocs_init()
678 * Initialize the L3CC table as part of mocs initalization to make in intel_mocs_init()
683 init_l3cc_table(gt, &table); in intel_mocs_init()