Loading...
Note: File does not exist in v5.4.
1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright © 2022 Intel Corporation
4 */
5#ifndef _XE_PT_H_
6#define _XE_PT_H_
7
8#include <linux/types.h>
9
10#include "xe_pt_types.h"
11
12struct dma_fence;
13struct xe_bo;
14struct xe_device;
15struct xe_exec_queue;
16struct xe_sync_entry;
17struct xe_tile;
18struct xe_vm;
19struct xe_vma;
20struct xe_vma_ops;
21
22/* Largest huge pte is currently 1GiB. May become device dependent. */
23#define MAX_HUGEPTE_LEVEL 2
24
25#define xe_pt_write(xe, map, idx, data) \
26 xe_map_wr(xe, map, (idx) * sizeof(u64), u64, data)
27
28unsigned int xe_pt_shift(unsigned int level);
29
30struct xe_pt *xe_pt_create(struct xe_vm *vm, struct xe_tile *tile,
31 unsigned int level);
32
33void xe_pt_populate_empty(struct xe_tile *tile, struct xe_vm *vm,
34 struct xe_pt *pt);
35
36void xe_pt_destroy(struct xe_pt *pt, u32 flags, struct llist_head *deferred);
37
38int xe_pt_update_ops_prepare(struct xe_tile *tile, struct xe_vma_ops *vops);
39struct dma_fence *xe_pt_update_ops_run(struct xe_tile *tile,
40 struct xe_vma_ops *vops);
41void xe_pt_update_ops_fini(struct xe_tile *tile, struct xe_vma_ops *vops);
42void xe_pt_update_ops_abort(struct xe_tile *tile, struct xe_vma_ops *vops);
43
44bool xe_pt_zap_ptes(struct xe_tile *tile, struct xe_vma *vma);
45
46#endif