Lines Matching refs:table
24 const struct drm_i915_mocs_entry *table; member
419 struct drm_i915_mocs_table *table) in get_mocs_settings() argument
423 memset(table, 0, sizeof(struct drm_i915_mocs_table)); in get_mocs_settings()
425 table->unused_entries_index = I915_MOCS_PTE; in get_mocs_settings()
428 table->size = ARRAY_SIZE(dg2_mocs_table_g10_ax); in get_mocs_settings()
429 table->table = dg2_mocs_table_g10_ax; in get_mocs_settings()
431 table->size = ARRAY_SIZE(dg2_mocs_table); in get_mocs_settings()
432 table->table = dg2_mocs_table; in get_mocs_settings()
434 table->uc_index = 1; in get_mocs_settings()
435 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
436 table->unused_entries_index = 3; in get_mocs_settings()
438 table->size = ARRAY_SIZE(xehpsdv_mocs_table); in get_mocs_settings()
439 table->table = xehpsdv_mocs_table; in get_mocs_settings()
440 table->uc_index = 2; in get_mocs_settings()
441 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
442 table->unused_entries_index = 5; in get_mocs_settings()
444 table->size = ARRAY_SIZE(dg1_mocs_table); in get_mocs_settings()
445 table->table = dg1_mocs_table; in get_mocs_settings()
446 table->uc_index = 1; in get_mocs_settings()
447 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
448 table->uc_index = 1; in get_mocs_settings()
449 table->unused_entries_index = 5; in get_mocs_settings()
452 table->size = ARRAY_SIZE(tgl_mocs_table); in get_mocs_settings()
453 table->table = tgl_mocs_table; in get_mocs_settings()
454 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
455 table->uc_index = 3; in get_mocs_settings()
457 table->size = ARRAY_SIZE(gen12_mocs_table); in get_mocs_settings()
458 table->table = gen12_mocs_table; in get_mocs_settings()
459 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
460 table->uc_index = 3; in get_mocs_settings()
461 table->unused_entries_index = 2; in get_mocs_settings()
463 table->size = ARRAY_SIZE(icl_mocs_table); in get_mocs_settings()
464 table->table = icl_mocs_table; in get_mocs_settings()
465 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
467 table->size = ARRAY_SIZE(skl_mocs_table); in get_mocs_settings()
468 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
469 table->table = skl_mocs_table; in get_mocs_settings()
471 table->size = ARRAY_SIZE(broxton_mocs_table); in get_mocs_settings()
472 table->n_entries = GEN9_NUM_MOCS_ENTRIES; in get_mocs_settings()
473 table->table = broxton_mocs_table; in get_mocs_settings()
480 if (GEM_DEBUG_WARN_ON(table->size > table->n_entries)) in get_mocs_settings()
487 for (i = 0; i < table->size; i++) in get_mocs_settings()
488 if (GEM_DEBUG_WARN_ON(table->table[i].l3cc_value & in get_mocs_settings()
511 static u32 get_entry_control(const struct drm_i915_mocs_table *table, in get_entry_control() argument
514 if (index < table->size && table->table[index].used) in get_entry_control()
515 return table->table[index].control_value; in get_entry_control()
516 return table->table[table->unused_entries_index].control_value; in get_entry_control()
525 const struct drm_i915_mocs_table *table, in __init_mocs_table() argument
531 drm_WARN_ONCE(&uncore->i915->drm, !table->unused_entries_index, in __init_mocs_table()
533 for_each_mocs(mocs, table, i) in __init_mocs_table()
553 const struct drm_i915_mocs_table *table) in init_mocs_table() argument
555 __init_mocs_table(engine->uncore, table, mocs_offset(engine)); in init_mocs_table()
563 static u16 get_entry_l3cc(const struct drm_i915_mocs_table *table, in get_entry_l3cc() argument
566 if (index < table->size && table->table[index].used) in get_entry_l3cc()
567 return table->table[index].l3cc_value; in get_entry_l3cc()
568 return table->table[table->unused_entries_index].l3cc_value; in get_entry_l3cc()
585 const struct drm_i915_mocs_table *table) in init_l3cc_table() argument
590 for_each_l3cc(l3cc, table, i) in init_l3cc_table()
596 struct drm_i915_mocs_table table; in intel_mocs_init_engine() local
602 flags = get_mocs_settings(engine->i915, &table); in intel_mocs_init_engine()
608 init_mocs_table(engine, &table); in intel_mocs_init_engine()
611 init_l3cc_table(engine->uncore, &table); in intel_mocs_init_engine()
621 struct drm_i915_mocs_table table; in intel_set_mocs_index() local
623 get_mocs_settings(gt->i915, &table); in intel_set_mocs_index()
624 gt->mocs.uc_index = table.uc_index; in intel_set_mocs_index()
629 struct drm_i915_mocs_table table; in intel_mocs_init() local
635 flags = get_mocs_settings(gt->i915, &table); in intel_mocs_init()
637 __init_mocs_table(gt->uncore, &table, global_mocs_offset()); in intel_mocs_init()
645 init_l3cc_table(gt->uncore, &table); in intel_mocs_init()