mirror of
https://github.com/torvalds/linux.git
synced 2026-04-20 07:43:57 -04:00
Soon we will be required to exclude some of the GGTT addresses from the allocations, since on some platforms running the SR-IOV VF mode, we will be able to use only selected range of the GGTT space. Add helper functions to manage such GGTT range exclusions, and follow the naming from the similar concept used by GVT-g. Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Link: https://lore.kernel.org/r/20240111182559.629-1-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2021 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_GGTT_H_
|
|
#define _XE_GGTT_H_
|
|
|
|
#include "xe_ggtt_types.h"
|
|
|
|
struct drm_printer;
|
|
|
|
void xe_ggtt_set_pte(struct xe_ggtt *ggtt, u64 addr, u64 pte);
|
|
void xe_ggtt_invalidate(struct xe_ggtt *ggtt);
|
|
int xe_ggtt_init_early(struct xe_ggtt *ggtt);
|
|
int xe_ggtt_init(struct xe_ggtt *ggtt);
|
|
void xe_ggtt_printk(struct xe_ggtt *ggtt, const char *prefix);
|
|
|
|
int xe_ggtt_balloon(struct xe_ggtt *ggtt, u64 start, u64 size, struct drm_mm_node *node);
|
|
void xe_ggtt_deballoon(struct xe_ggtt *ggtt, struct drm_mm_node *node);
|
|
|
|
int xe_ggtt_insert_special_node(struct xe_ggtt *ggtt, struct drm_mm_node *node,
|
|
u32 size, u32 align);
|
|
int xe_ggtt_insert_special_node_locked(struct xe_ggtt *ggtt,
|
|
struct drm_mm_node *node,
|
|
u32 size, u32 align, u32 mm_flags);
|
|
void xe_ggtt_remove_node(struct xe_ggtt *ggtt, struct drm_mm_node *node);
|
|
void xe_ggtt_map_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
|
|
int xe_ggtt_insert_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
|
|
int xe_ggtt_insert_bo_at(struct xe_ggtt *ggtt, struct xe_bo *bo,
|
|
u64 start, u64 end);
|
|
void xe_ggtt_remove_bo(struct xe_ggtt *ggtt, struct xe_bo *bo);
|
|
|
|
int xe_ggtt_dump(struct xe_ggtt *ggtt, struct drm_printer *p);
|
|
|
|
#endif
|