summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_region_ttm.h
blob: 1c82c6c3429d3f7f8d4bfbfee15c53137ecd7e5e (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
/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2021 Intel Corporation
 */
#ifndef _INTEL_REGION_TTM_H_
#define _INTEL_REGION_TTM_H_

#include <linux/types.h>

#include "i915_selftest.h"

struct drm_i915_private;
struct intel_memory_region;

int intel_region_ttm_device_init(struct drm_i915_private *dev_priv);

void intel_region_ttm_device_fini(struct drm_i915_private *dev_priv);

int intel_region_ttm_init(struct intel_memory_region *mem);

void intel_region_ttm_fini(struct intel_memory_region *mem);

struct sg_table *intel_region_ttm_node_to_st(struct intel_memory_region *mem,
					     void *node);

void *intel_region_ttm_node_alloc(struct intel_memory_region *mem,
				  resource_size_t size,
				  unsigned int flags);

void intel_region_ttm_node_free(struct intel_memory_region *mem,
				void *node);
#endif /* _INTEL_REGION_TTM_H_ */