04bb26b0938e2b62d9e2f71e379a15ed6c756f01
[linux-2.6-block.git] / drivers / gpu / drm / xe / xe_ggtt.h
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2021 Intel Corporation
4  */
5
6 #ifndef _XE_GGTT_H_
7 #define _XE_GGTT_H_
8
9 #include "xe_ggtt_types.h"
10
11 struct drm_printer;
12
13 void xe_ggtt_set_pte(struct xe_ggtt *ggtt, u64 addr, u64 pte);
14 void xe_ggtt_invalidate(struct xe_ggtt *ggtt);
15 int xe_ggtt_init_noalloc(struct xe_ggtt *ggtt);
16 int xe_ggtt_init(struct xe_ggtt *ggtt);
17 void xe_ggtt_printk(struct xe_ggtt *ggtt, const char *prefix);
18
19 int xe_ggtt_insert_special_node(struct xe_ggtt *ggtt, struct drm_mm_node *node,
20                                 u32 size, u32 align);
21 int xe_ggtt_insert_special_node_locked(struct xe_ggtt *ggtt,
22                                        struct drm_mm_node *node,
23                                        u32 size, u32 align, u32 mm_flags);
24 void xe_ggtt_remove_node(struct xe_ggtt *ggtt, struct drm_mm_node *node);
25 void xe_ggtt_map_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
26 int xe_ggtt_insert_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
27 int xe_ggtt_insert_bo_at(struct xe_ggtt *ggtt, struct xe_bo *bo, u64 ofs);
28 void xe_ggtt_remove_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
29
30 int xe_ggtt_dump(struct xe_ggtt *ggtt, struct drm_printer *p);
31
32 #endif