Lines Matching full:mmio

200 	struct engine_mmio *mmio;  in restore_context_mmio_for_inhibit()  local
217 for (mmio = gvt->engine_mmio_list.mmio; in restore_context_mmio_for_inhibit()
218 i915_mmio_reg_valid(mmio->reg); mmio++) { in restore_context_mmio_for_inhibit()
219 if (mmio->id != ring_id || !mmio->in_context) in restore_context_mmio_for_inhibit()
222 *cs++ = i915_mmio_reg_offset(mmio->reg); in restore_context_mmio_for_inhibit()
223 *cs++ = vgpu_vreg_t(vgpu, mmio->reg) | (mmio->mask << 16); in restore_context_mmio_for_inhibit()
293 * Use lri command to initialize the mmio which is in context state image for
294 * inhibit context, it contains tracked engine mmio, render_mocs and
466 /* Switch ring mmio values (context). */
473 struct engine_mmio *mmio; in switch_mmio() local
479 for (mmio = engine->i915->gvt->engine_mmio_list.mmio; in switch_mmio()
480 i915_mmio_reg_valid(mmio->reg); mmio++) { in switch_mmio()
481 if (mmio->id != engine->id) in switch_mmio()
484 * No need to do save or restore of the mmio which is in context in switch_mmio()
488 if (IS_GEN(engine->i915, 9) && mmio->in_context) in switch_mmio()
493 vgpu_vreg_t(pre, mmio->reg) = in switch_mmio()
494 intel_uncore_read_fw(uncore, mmio->reg); in switch_mmio()
495 if (mmio->mask) in switch_mmio()
496 vgpu_vreg_t(pre, mmio->reg) &= in switch_mmio()
497 ~(mmio->mask << 16); in switch_mmio()
498 old_v = vgpu_vreg_t(pre, mmio->reg); in switch_mmio()
500 old_v = mmio->value = in switch_mmio()
501 intel_uncore_read_fw(uncore, mmio->reg); in switch_mmio()
508 * No need to restore the mmio which is in context state in switch_mmio()
512 if (mmio->in_context && in switch_mmio()
516 if (mmio->mask) in switch_mmio()
517 new_v = vgpu_vreg_t(next, mmio->reg) | in switch_mmio()
518 (mmio->mask << 16); in switch_mmio()
520 new_v = vgpu_vreg_t(next, mmio->reg); in switch_mmio()
522 if (mmio->in_context) in switch_mmio()
524 if (mmio->mask) in switch_mmio()
525 new_v = mmio->value | (mmio->mask << 16); in switch_mmio()
527 new_v = mmio->value; in switch_mmio()
530 intel_uncore_write_fw(uncore, mmio->reg, new_v); in switch_mmio()
535 i915_mmio_reg_offset(mmio->reg), in switch_mmio()
544 * intel_gvt_switch_render_mmio - switch mmio context of specific engine
564 * We are using raw mmio access wrapper to improve the in intel_gvt_switch_mmio()
565 * performace for batch mmio read/write, so we need in intel_gvt_switch_mmio()
574 * intel_gvt_init_engine_mmio_context - Initiate the engine mmio list
580 struct engine_mmio *mmio; in intel_gvt_init_engine_mmio_context() local
583 gvt->engine_mmio_list.mmio = gen9_engine_mmio_list; in intel_gvt_init_engine_mmio_context()
589 gvt->engine_mmio_list.mmio = gen8_engine_mmio_list; in intel_gvt_init_engine_mmio_context()
594 for (mmio = gvt->engine_mmio_list.mmio; in intel_gvt_init_engine_mmio_context()
595 i915_mmio_reg_valid(mmio->reg); mmio++) { in intel_gvt_init_engine_mmio_context()
596 if (mmio->in_context) { in intel_gvt_init_engine_mmio_context()
597 gvt->engine_mmio_list.ctx_mmio_count[mmio->id]++; in intel_gvt_init_engine_mmio_context()
598 intel_gvt_mmio_set_sr_in_ctx(gvt, mmio->reg.reg); in intel_gvt_init_engine_mmio_context()