Lines Matching full:table

24 	const struct drm_i915_mocs_entry *table;  member
108 * entries will remain constant and the table will only be updated by
440 struct drm_i915_mocs_table *table) in get_mocs_settings() argument
444 memset(table, 0, sizeof(struct drm_i915_mocs_table)); in get_mocs_settings()
446 table->unused_entries_index = I915_MOCS_PTE; in get_mocs_settings()
448 table->size = ARRAY_SIZE(pvc_mocs_table); in get_mocs_settings()
449 table->table = pvc_mocs_table; in get_mocs_settings()
450 table->n_entries = PVC_NUM_MOCS_ENTRIES; in get_mocs_settings()
451 table->uc_index = 1; in get_mocs_settings()
452 table->wb_index = 2; in get_mocs_settings()
453 table->unused_entries_index = 2; in get_mocs_settings()
456 table->size = ARRAY_SIZE(dg2_mocs_table_g10_ax); in get_mocs_settings()
457 table->table = dg2_mocs_table_g10_ax; in get_mocs_settings()
459 table->size = ARRAY_SIZE(dg2_mocs_table); in get_mocs_settings()
460 table->table = dg2_mocs_table; in get_mocs_settings()
462 table->uc_index = 1; in get_mocs_settings()
463 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
464 table->unused_entries_index = 3; in get_mocs_settings()
466 table->size = ARRAY_SIZE(xehpsdv_mocs_table); in get_mocs_settings()
467 table->table = xehpsdv_mocs_table; in get_mocs_settings()
468 table->uc_index = 2; in get_mocs_settings()
469 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
470 table->unused_entries_index = 5; in get_mocs_settings()
472 table->size = ARRAY_SIZE(dg1_mocs_table); in get_mocs_settings()
473 table->table = dg1_mocs_table; in get_mocs_settings()
474 table->uc_index = 1; in get_mocs_settings()
475 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
476 table->uc_index = 1; in get_mocs_settings()
477 table->unused_entries_index = 5; in get_mocs_settings()
480 table->size = ARRAY_SIZE(tgl_mocs_table); in get_mocs_settings()
481 table->table = tgl_mocs_table; in get_mocs_settings()
482 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
483 table->uc_index = 3; in get_mocs_settings()
485 table->size = ARRAY_SIZE(gen12_mocs_table); in get_mocs_settings()
486 table->table = gen12_mocs_table; in get_mocs_settings()
487 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
488 table->uc_index = 3; in get_mocs_settings()
489 table->unused_entries_index = 2; in get_mocs_settings()
491 table->size = ARRAY_SIZE(icl_mocs_table); in get_mocs_settings()
492 table->table = icl_mocs_table; in get_mocs_settings()
493 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
495 table->size = ARRAY_SIZE(skl_mocs_table); in get_mocs_settings()
496 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
497 table->table = skl_mocs_table; in get_mocs_settings()
499 table->size = ARRAY_SIZE(broxton_mocs_table); in get_mocs_settings()
500 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
501 table->table = broxton_mocs_table; in get_mocs_settings()
504 "Platform that should have a MOCS table does not.\n"); in get_mocs_settings()
508 if (GEM_DEBUG_WARN_ON(table->size > table->n_entries)) in get_mocs_settings()
515 for (i = 0; i < table->size; i++) in get_mocs_settings()
516 if (GEM_DEBUG_WARN_ON(table->table[i].l3cc_value & in get_mocs_settings()
539 static u32 get_entry_control(const struct drm_i915_mocs_table *table, in get_entry_control() argument
542 if (index < table->size && table->table[index].used) in get_entry_control()
543 return table->table[index].control_value; in get_entry_control()
544 return table->table[table->unused_entries_index].control_value; in get_entry_control()
553 const struct drm_i915_mocs_table *table, in __init_mocs_table() argument
559 drm_WARN_ONCE(&uncore->i915->drm, !table->unused_entries_index, in __init_mocs_table()
561 for_each_mocs(mocs, table, i) in __init_mocs_table()
581 const struct drm_i915_mocs_table *table) in init_mocs_table() argument
583 __init_mocs_table(engine->uncore, table, mocs_offset(engine)); in init_mocs_table()
591 static u16 get_entry_l3cc(const struct drm_i915_mocs_table *table, in get_entry_l3cc() argument
594 if (index < table->size && table->table[index].used) in get_entry_l3cc()
595 return table->table[index].l3cc_value; in get_entry_l3cc()
596 return table->table[table->unused_entries_index].l3cc_value; in get_entry_l3cc()
613 const struct drm_i915_mocs_table *table) in init_l3cc_table() argument
618 for_each_l3cc(l3cc, table, i) in init_l3cc_table()
624 struct drm_i915_mocs_table table; in intel_mocs_init_engine() local
630 flags = get_mocs_settings(engine->i915, &table); in intel_mocs_init_engine()
636 init_mocs_table(engine, &table); in intel_mocs_init_engine()
639 init_l3cc_table(engine->uncore, &table); in intel_mocs_init_engine()
649 struct drm_i915_mocs_table table; in intel_set_mocs_index() local
651 get_mocs_settings(gt->i915, &table); in intel_set_mocs_index()
652 gt->mocs.uc_index = table.uc_index; in intel_set_mocs_index()
654 gt->mocs.wb_index = table.wb_index; in intel_set_mocs_index()
659 struct drm_i915_mocs_table table; in intel_mocs_init() local
665 flags = get_mocs_settings(gt->i915, &table); in intel_mocs_init()
667 __init_mocs_table(gt->uncore, &table, global_mocs_offset()); in intel_mocs_init()
670 * Initialize the L3CC table as part of mocs initalization to make in intel_mocs_init()
675 init_l3cc_table(gt->uncore, &table); in intel_mocs_init()