summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/xe/xe_ggtt_types.h
blob: d8c584d9a8c3ff978de22550c2c93c8e1cc8605a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2022 Intel Corporation
 */

#ifndef _XE_GGTT_TYPES_H_
#define _XE_GGTT_TYPES_H_

#include <drm/drm_mm.h>

#include "xe_pt_types.h"

struct xe_bo;
struct xe_gt;

struct xe_ggtt_pt_ops {
	u64 (*pte_encode_bo)(struct xe_bo *bo, u64 bo_offset, u16 pat_index);
};

struct xe_ggtt {
	struct xe_tile *tile;

	u64 size;

#define XE_GGTT_FLAGS_64K BIT(0)
	unsigned int flags;

	struct xe_bo *scratch;

	struct mutex lock;

	u64 __iomem *gsm;

	const struct xe_ggtt_pt_ops *pt_ops;

	struct drm_mm mm;
};

#endif