Lines Matching full:gma
478 * Per-platform GMA routines.
480 static unsigned long gma_to_ggtt_pte_index(unsigned long gma) in gma_to_ggtt_pte_index() argument
482 unsigned long x = (gma >> I915_GTT_PAGE_SHIFT); in gma_to_ggtt_pte_index()
484 trace_gma_index(__func__, gma, x); in gma_to_ggtt_pte_index()
489 static unsigned long prefix##_gma_to_##ename##_index(unsigned long gma) \
492 trace_gma_index(__func__, gma, x); \
496 DEFINE_PPGTT_GMA_TO_INDEX(gen8, pte, (gma >> 12 & 0x1ff));
497 DEFINE_PPGTT_GMA_TO_INDEX(gen8, pde, (gma >> 21 & 0x1ff));
498 DEFINE_PPGTT_GMA_TO_INDEX(gen8, l3_pdp, (gma >> 30 & 0x3));
499 DEFINE_PPGTT_GMA_TO_INDEX(gen8, l4_pdp, (gma >> 30 & 0x1ff));
500 DEFINE_PPGTT_GMA_TO_INDEX(gen8, pml4, (gma >> 39 & 0x1ff));
2079 * GMA translation APIs.
2100 * intel_vgpu_gma_to_gpa - translate a gma to GPA
2102 * @gma: graphics memory address in this mm object
2110 unsigned long intel_vgpu_gma_to_gpa(struct intel_vgpu_mm *mm, unsigned long gma) in intel_vgpu_gma_to_gpa() argument
2126 if (!vgpu_gmadr_is_valid(vgpu, gma)) in intel_vgpu_gma_to_gpa()
2130 gma_ops->gma_to_ggtt_pte_index(gma)); in intel_vgpu_gma_to_gpa()
2133 + (gma & ~I915_GTT_PAGE_MASK); in intel_vgpu_gma_to_gpa()
2135 trace_gma_translate(vgpu->id, "ggtt", 0, 0, gma, gpa); in intel_vgpu_gma_to_gpa()
2141 gma_index[0] = gma_ops->gma_to_pml4_index(gma); in intel_vgpu_gma_to_gpa()
2142 gma_index[1] = gma_ops->gma_to_l4_pdp_index(gma); in intel_vgpu_gma_to_gpa()
2143 gma_index[2] = gma_ops->gma_to_pde_index(gma); in intel_vgpu_gma_to_gpa()
2144 gma_index[3] = gma_ops->gma_to_pte_index(gma); in intel_vgpu_gma_to_gpa()
2149 gma_ops->gma_to_l3_pdp_index(gma)); in intel_vgpu_gma_to_gpa()
2151 gma_index[0] = gma_ops->gma_to_pde_index(gma); in intel_vgpu_gma_to_gpa()
2152 gma_index[1] = gma_ops->gma_to_pte_index(gma); in intel_vgpu_gma_to_gpa()
2167 gvt_dbg_core("GMA 0x%lx is not present\n", gma); in intel_vgpu_gma_to_gpa()
2173 (gma & ~I915_GTT_PAGE_MASK); in intel_vgpu_gma_to_gpa()
2175 mm->ppgtt_mm.root_entry_type, gma, gpa); in intel_vgpu_gma_to_gpa()
2180 gvt_vgpu_err("invalid mm type: %d gma %lx\n", mm->type, gma); in intel_vgpu_gma_to_gpa()
2190 unsigned long gma; in emulate_ggtt_mmio_read() local
2196 gma = index << I915_GTT_PAGE_SHIFT; in emulate_ggtt_mmio_read()
2198 gma, 1 << I915_GTT_PAGE_SHIFT)) { in emulate_ggtt_mmio_read()
2199 gvt_dbg_mm("read invalid ggtt at 0x%lx\n", gma); in emulate_ggtt_mmio_read()
2256 unsigned long gma, gfn; in emulate_ggtt_mmio_write() local
2267 gma = g_gtt_index << I915_GTT_PAGE_SHIFT; in emulate_ggtt_mmio_write()
2270 if (!vgpu_gmadr_is_valid(vgpu, gma)) in emulate_ggtt_mmio_write()