Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.17-rc3 57 lines 2.1 kB view raw
1/* SPDX-License-Identifier: MIT */ 2/* 3 * Copyright © 2021 Intel Corporation 4 */ 5 6#ifndef _XE_GGTT_H_ 7#define _XE_GGTT_H_ 8 9#include "xe_ggtt_types.h" 10 11struct drm_printer; 12struct xe_tile; 13 14struct xe_ggtt *xe_ggtt_alloc(struct xe_tile *tile); 15int xe_ggtt_init_early(struct xe_ggtt *ggtt); 16int xe_ggtt_init_kunit(struct xe_ggtt *ggtt, u32 reserved, u32 size); 17int xe_ggtt_init(struct xe_ggtt *ggtt); 18 19struct xe_ggtt_node *xe_ggtt_node_init(struct xe_ggtt *ggtt); 20void xe_ggtt_node_fini(struct xe_ggtt_node *node); 21int xe_ggtt_node_insert_balloon_locked(struct xe_ggtt_node *node, 22 u64 start, u64 size); 23void xe_ggtt_node_remove_balloon_locked(struct xe_ggtt_node *node); 24void xe_ggtt_shift_nodes_locked(struct xe_ggtt *ggtt, s64 shift); 25 26int xe_ggtt_node_insert(struct xe_ggtt_node *node, u32 size, u32 align); 27int xe_ggtt_node_insert_locked(struct xe_ggtt_node *node, 28 u32 size, u32 align, u32 mm_flags); 29void xe_ggtt_node_remove(struct xe_ggtt_node *node, bool invalidate); 30bool xe_ggtt_node_allocated(const struct xe_ggtt_node *node); 31void xe_ggtt_map_bo(struct xe_ggtt *ggtt, struct xe_ggtt_node *node, 32 struct xe_bo *bo, u16 pat_index); 33void xe_ggtt_map_bo_unlocked(struct xe_ggtt *ggtt, struct xe_bo *bo); 34int xe_ggtt_insert_bo(struct xe_ggtt *ggtt, struct xe_bo *bo); 35int xe_ggtt_insert_bo_at(struct xe_ggtt *ggtt, struct xe_bo *bo, 36 u64 start, u64 end); 37void xe_ggtt_remove_bo(struct xe_ggtt *ggtt, struct xe_bo *bo); 38u64 xe_ggtt_largest_hole(struct xe_ggtt *ggtt, u64 alignment, u64 *spare); 39 40int xe_ggtt_dump(struct xe_ggtt *ggtt, struct drm_printer *p); 41u64 xe_ggtt_print_holes(struct xe_ggtt *ggtt, u64 alignment, struct drm_printer *p); 42 43#ifdef CONFIG_PCI_IOV 44void xe_ggtt_assign(const struct xe_ggtt_node *node, u16 vfid); 45#endif 46 47#ifndef CONFIG_LOCKDEP 48static inline void xe_ggtt_might_lock(struct xe_ggtt *ggtt) 49{ } 50#else 51void xe_ggtt_might_lock(struct xe_ggtt *ggtt); 52#endif 53 54u64 xe_ggtt_encode_pte_flags(struct xe_ggtt *ggtt, struct xe_bo *bo, u16 pat_index); 55u64 xe_ggtt_read_pte(struct xe_ggtt *ggtt, u64 offset); 56 57#endif