Loading...
Note: File does not exist in v3.1.
1/* SPDX-License-Identifier: GPL-2.0 AND MIT */
2/*
3 * Copyright © 2023 Intel Corporation
4 */
5#ifndef TTM_MOCK_MANAGER_H
6#define TTM_MOCK_MANAGER_H
7
8#include <drm/drm_buddy.h>
9
10struct ttm_mock_manager {
11 struct ttm_resource_manager man;
12 struct drm_buddy mm;
13 u64 default_page_size;
14 /* protects allocations of mock buffer objects */
15 struct mutex lock;
16};
17
18struct ttm_mock_resource {
19 struct ttm_resource base;
20 struct list_head blocks;
21 unsigned long flags;
22};
23
24int ttm_mock_manager_init(struct ttm_device *bdev, u32 mem_type, u32 size);
25int ttm_bad_manager_init(struct ttm_device *bdev, u32 mem_type, u32 size);
26int ttm_busy_manager_init(struct ttm_device *bdev, u32 mem_type, u32 size);
27void ttm_mock_manager_fini(struct ttm_device *bdev, u32 mem_type);
28void ttm_bad_manager_fini(struct ttm_device *bdev, u32 mem_type);
29
30#endif // TTM_MOCK_MANAGER_H