File: intel_region_ttm.h

package info (click to toggle)
linux 6.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,488,076 kB
  • sloc: ansic: 23,401,844; asm: 266,744; sh: 108,976; makefile: 49,705; python: 36,927; perl: 36,810; cpp: 6,044; yacc: 4,904; lex: 2,722; awk: 1,440; ruby: 25; sed: 5
file content (44 lines) | stat: -rw-r--r-- 1,171 bytes parent folder | download | duplicates (15)
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
40
41
42
43
44
/* 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;
struct ttm_resource;
struct ttm_device_funcs;

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);

int intel_region_ttm_fini(struct intel_memory_region *mem);

struct i915_refct_sgt *
intel_region_ttm_resource_to_rsgt(struct intel_memory_region *mem,
				  struct ttm_resource *res,
				  u32 page_alignment);

void intel_region_ttm_resource_free(struct intel_memory_region *mem,
				    struct ttm_resource *res);

int intel_region_to_ttm_type(const struct intel_memory_region *mem);

struct ttm_device_funcs *i915_ttm_driver(void);

#ifdef CONFIG_DRM_I915_SELFTEST
struct ttm_resource *
intel_region_ttm_resource_alloc(struct intel_memory_region *mem,
				resource_size_t offset,
				resource_size_t size,
				unsigned int flags);
#endif
#endif /* _INTEL_REGION_TTM_H_ */