Lines Matching full:mmio

214 	struct engine_mmio *mmio;  in restore_context_mmio_for_inhibit()  local
231 for (mmio = gvt->engine_mmio_list.mmio; in restore_context_mmio_for_inhibit()
232 i915_mmio_reg_valid(mmio->reg); mmio++) { in restore_context_mmio_for_inhibit()
233 if (mmio->id != ring_id || !mmio->in_context) in restore_context_mmio_for_inhibit()
236 *cs++ = i915_mmio_reg_offset(mmio->reg); in restore_context_mmio_for_inhibit()
237 *cs++ = vgpu_vreg_t(vgpu, mmio->reg) | (mmio->mask << 16); in restore_context_mmio_for_inhibit()
307 * Use lri command to initialize the mmio which is in context state image for
308 * inhibit context, it contains tracked engine mmio, render_mocs and
480 /* Switch ring mmio values (context). */
487 struct engine_mmio *mmio; in switch_mmio() local
493 for (mmio = engine->i915->gvt->engine_mmio_list.mmio; in switch_mmio()
494 i915_mmio_reg_valid(mmio->reg); mmio++) { in switch_mmio()
495 if (mmio->id != engine->id) in switch_mmio()
498 * No need to do save or restore of the mmio which is in context in switch_mmio()
502 if (GRAPHICS_VER(engine->i915) == 9 && mmio->in_context) in switch_mmio()
507 vgpu_vreg_t(pre, mmio->reg) = in switch_mmio()
508 intel_uncore_read_fw(uncore, mmio->reg); in switch_mmio()
509 if (mmio->mask) in switch_mmio()
510 vgpu_vreg_t(pre, mmio->reg) &= in switch_mmio()
511 ~(mmio->mask << 16); in switch_mmio()
512 old_v = vgpu_vreg_t(pre, mmio->reg); in switch_mmio()
514 old_v = mmio->value = in switch_mmio()
515 intel_uncore_read_fw(uncore, mmio->reg); in switch_mmio()
522 * No need to restore the mmio which is in context state in switch_mmio()
526 if (mmio->in_context && in switch_mmio()
530 if (mmio->mask) in switch_mmio()
531 new_v = vgpu_vreg_t(next, mmio->reg) | in switch_mmio()
532 (mmio->mask << 16); in switch_mmio()
534 new_v = vgpu_vreg_t(next, mmio->reg); in switch_mmio()
536 if (mmio->in_context) in switch_mmio()
538 if (mmio->mask) in switch_mmio()
539 new_v = mmio->value | (mmio->mask << 16); in switch_mmio()
541 new_v = mmio->value; in switch_mmio()
544 intel_uncore_write_fw(uncore, mmio->reg, new_v); in switch_mmio()
549 i915_mmio_reg_offset(mmio->reg), in switch_mmio()
558 * intel_gvt_switch_mmio - switch mmio context of specific engine
578 * We are using raw mmio access wrapper to improve the in intel_gvt_switch_mmio()
579 * performace for batch mmio read/write, so we need in intel_gvt_switch_mmio()
588 * intel_gvt_init_engine_mmio_context - Initiate the engine mmio list
594 struct engine_mmio *mmio; in intel_gvt_init_engine_mmio_context() local
597 gvt->engine_mmio_list.mmio = gen9_engine_mmio_list; in intel_gvt_init_engine_mmio_context()
603 gvt->engine_mmio_list.mmio = gen8_engine_mmio_list; in intel_gvt_init_engine_mmio_context()
608 for (mmio = gvt->engine_mmio_list.mmio; in intel_gvt_init_engine_mmio_context()
609 i915_mmio_reg_valid(mmio->reg); mmio++) { in intel_gvt_init_engine_mmio_context()
610 if (mmio->in_context) { in intel_gvt_init_engine_mmio_context()
611 gvt->engine_mmio_list.ctx_mmio_count[mmio->id]++; in intel_gvt_init_engine_mmio_context()
612 intel_gvt_mmio_set_sr_in_ctx(gvt, mmio->reg.reg); in intel_gvt_init_engine_mmio_context()