1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright �� 2022 Intel Corporation
4 */
5
6#ifndef _XE_GGTT_TYPES_H_
7#define _XE_GGTT_TYPES_H_
8
9#include <drm/drm_mm.h>
10
11#include "xe_pt_types.h"
12
13struct xe_bo;
14struct xe_gt;
15
16struct xe_ggtt_pt_ops {
17	u64 (*pte_encode_bo)(struct xe_bo *bo, u64 bo_offset, u16 pat_index);
18};
19
20struct xe_ggtt {
21	struct xe_tile *tile;
22
23	u64 size;
24
25#define XE_GGTT_FLAGS_64K BIT(0)
26	unsigned int flags;
27
28	struct xe_bo *scratch;
29
30	struct mutex lock;
31
32	u64 __iomem *gsm;
33
34	const struct xe_ggtt_pt_ops *pt_ops;
35
36	struct drm_mm mm;
37};
38
39#endif
40