mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-21 10:05:00 +08:00
213d509277
Most logical place to introduce TTM buffer objects is as an i915 gem object backend. We need to add some ops to account for added functionality like delayed delete and LRU list manipulation. Initially we support only LMEM and SYSTEM memory, but SYSTEM (which in this case means evicted LMEM objects) is not visible to i915 GEM yet. The plan is to move the i915 gem system region over to the TTM system memory type in upcoming patches. We set up GPU bindings directly both from LMEM and from the system region, as there is no need to use the legacy TTM_TT memory type. We reserve that for future porting of GGTT bindings to TTM. Remove the old lmem backend. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210610070152.572423-2-thomas.hellstrom@linux.intel.com
40 lines
1.0 KiB
C
40 lines
1.0 KiB
C
/* 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);
|
|
|
|
void intel_region_ttm_fini(struct intel_memory_region *mem);
|
|
|
|
struct sg_table *intel_region_ttm_node_to_st(struct intel_memory_region *mem,
|
|
struct ttm_resource *res);
|
|
|
|
void intel_region_ttm_node_free(struct intel_memory_region *mem,
|
|
struct ttm_resource *node);
|
|
|
|
struct ttm_device_funcs *i915_ttm_driver(void);
|
|
|
|
#ifdef CONFIG_DRM_I915_SELFTEST
|
|
struct ttm_resource *
|
|
intel_region_ttm_node_alloc(struct intel_memory_region *mem,
|
|
resource_size_t size,
|
|
unsigned int flags);
|
|
#endif
|
|
#endif /* _INTEL_REGION_TTM_H_ */
|