struct xe_device *xe = xe_bo_device(bo);
        struct xe_ggtt *ggtt = xe_device_get_root_tile(xe)->mem.ggtt;
        u32 column, row;
+       u64 pte = xe_ggtt_encode_pte_flags(ggtt, bo, xe->pat.idx[XE_CACHE_NONE]);
 
        /* TODO: Maybe rewrite so we can traverse the bo addresses sequentially,
         * by writing dpt/ggtt in a different order?
                u32 src_idx = src_stride * (height - 1) + column + bo_ofs;
 
                for (row = 0; row < height; row++) {
-                       u64 pte = ggtt->pt_ops->pte_encode_bo(bo, src_idx * XE_PAGE_SIZE,
-                                                             xe->pat.idx[XE_CACHE_NONE]);
+                       u64 addr = xe_bo_addr(bo, src_idx * XE_PAGE_SIZE, XE_PAGE_SIZE);
 
-                       iosys_map_wr(map, *dpt_ofs, u64, pte);
+                       iosys_map_wr(map, *dpt_ofs, u64, pte | addr);
                        *dpt_ofs += 8;
                        src_idx -= src_stride;
                }
 {
        struct xe_device *xe = xe_bo_device(bo);
        struct xe_ggtt *ggtt = xe_device_get_root_tile(xe)->mem.ggtt;
-       u64 (*pte_encode_bo)(struct xe_bo *bo, u64 bo_offset, u16 pat_index)
-               = ggtt->pt_ops->pte_encode_bo;
        u32 column, row;
+       u64 pte = xe_ggtt_encode_pte_flags(ggtt, bo, xe->pat.idx[XE_CACHE_NONE]);
 
        for (row = 0; row < height; row++) {
                u32 src_idx = src_stride * row + bo_ofs;
 
                for (column = 0; column < width; column++) {
-                       iosys_map_wr(map, *dpt_ofs, u64,
-                                    pte_encode_bo(bo, src_idx * XE_PAGE_SIZE,
-                                    xe->pat.idx[XE_CACHE_NONE]));
+                       u64 addr = xe_bo_addr(bo, src_idx * XE_PAGE_SIZE, XE_PAGE_SIZE);
+                       iosys_map_wr(map, *dpt_ofs, u64, pte | addr);
 
                        *dpt_ofs += 8;
                        src_idx++;
                return PTR_ERR(dpt);
 
        if (view->type == I915_GTT_VIEW_NORMAL) {
+               u64 pte = xe_ggtt_encode_pte_flags(ggtt, bo, xe->pat.idx[XE_CACHE_NONE]);
                u32 x;
 
                for (x = 0; x < size / XE_PAGE_SIZE; x++) {
-                       u64 pte = ggtt->pt_ops->pte_encode_bo(bo, x * XE_PAGE_SIZE,
-                                                             xe->pat.idx[XE_CACHE_NONE]);
+                       u64 addr = xe_bo_addr(bo, x * XE_PAGE_SIZE, XE_PAGE_SIZE);
 
-                       iosys_map_wr(&dpt->vmap, x * 8, u64, pte);
+                       iosys_map_wr(&dpt->vmap, x * 8, u64, pte | addr);
                }
        } else if (view->type == I915_GTT_VIEW_REMAPPED) {
                const struct intel_remapped_info *remap_info = &view->remapped;