FILE
xe_gt_sriov_pf_config.h
File preview with syntax highlighting.
linux-6.19.14/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h
1/* SPDX-License-Identifier: MIT */ 2/* 3 * Copyright © 2023-2024 Intel Corporation 4 */ 5 6#ifndef _XE_GT_SRIOV_PF_CONFIG_H_ 7#define _XE_GT_SRIOV_PF_CONFIG_H_ 8 9#include <linux/types.h> 10 11enum xe_guc_klv_threshold_index; 12struct drm_printer; 13struct xe_gt; 14 15u64 xe_gt_sriov_pf_config_get_ggtt(struct xe_gt *gt, unsigned int vfid); 16int xe_gt_sriov_pf_config_set_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size); 17int xe_gt_sriov_pf_config_set_fair_ggtt(struct xe_gt *gt, 18 unsigned int vfid, unsigned int num_vfs); 19int xe_gt_sriov_pf_config_bulk_set_ggtt(struct xe_gt *gt, 20 unsigned int vfid, unsigned int num_vfs, u64 size); 21 22u32 xe_gt_sriov_pf_config_get_ctxs(struct xe_gt *gt, unsigned int vfid); 23int xe_gt_sriov_pf_config_set_ctxs(struct xe_gt *gt, unsigned int vfid, u32 num_ctxs); 24int xe_gt_sriov_pf_config_set_fair_ctxs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs); 25int xe_gt_sriov_pf_config_bulk_set_ctxs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs, 26 u32 num_ctxs); 27 28u32 xe_gt_sriov_pf_config_get_dbs(struct xe_gt *gt, unsigned int vfid); 29int xe_gt_sriov_pf_config_set_dbs(struct xe_gt *gt, unsigned int vfid, u32 num_dbs); 30int xe_gt_sriov_pf_config_set_fair_dbs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs); 31int xe_gt_sriov_pf_config_bulk_set_dbs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs, 32 u32 num_dbs); 33 34u64 xe_gt_sriov_pf_config_get_lmem(struct xe_gt *gt, unsigned int vfid); 35int xe_gt_sriov_pf_config_set_lmem(struct xe_gt *gt, unsigned int vfid, u64 size); 36int xe_gt_sriov_pf_config_set_fair_lmem(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs); 37int xe_gt_sriov_pf_config_bulk_set_lmem(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs, 38 u64 size); 39struct xe_bo *xe_gt_sriov_pf_config_get_lmem_obj(struct xe_gt *gt, unsigned int vfid); 40 41u32 xe_gt_sriov_pf_config_get_exec_quantum(struct xe_gt *gt, unsigned int vfid); 42int xe_gt_sriov_pf_config_set_exec_quantum(struct xe_gt *gt, unsigned int vfid, u32 exec_quantum); 43 44u32 xe_gt_sriov_pf_config_get_exec_quantum_locked(struct xe_gt *gt, unsigned int vfid); 45int xe_gt_sriov_pf_config_set_exec_quantum_locked(struct xe_gt *gt, unsigned int vfid, 46 u32 exec_quantum); 47int xe_gt_sriov_pf_config_bulk_set_exec_quantum_locked(struct xe_gt *gt, u32 exec_quantum); 48 49u32 xe_gt_sriov_pf_config_get_preempt_timeout(struct xe_gt *gt, unsigned int vfid); 50int xe_gt_sriov_pf_config_set_preempt_timeout(struct xe_gt *gt, unsigned int vfid, 51 u32 preempt_timeout); 52 53u32 xe_gt_sriov_pf_config_get_preempt_timeout_locked(struct xe_gt *gt, unsigned int vfid); 54int xe_gt_sriov_pf_config_set_preempt_timeout_locked(struct xe_gt *gt, unsigned int vfid, 55 u32 preempt_timeout); 56int xe_gt_sriov_pf_config_bulk_set_preempt_timeout_locked(struct xe_gt *gt, u32 preempt_timeout); 57 58u32 xe_gt_sriov_pf_config_get_sched_priority(struct xe_gt *gt, unsigned int vfid); 59int xe_gt_sriov_pf_config_set_sched_priority(struct xe_gt *gt, unsigned int vfid, u32 priority); 60 61u32 xe_gt_sriov_pf_config_get_threshold(struct xe_gt *gt, unsigned int vfid, 62 enum xe_guc_klv_threshold_index index); 63int xe_gt_sriov_pf_config_set_threshold(struct xe_gt *gt, unsigned int vfid, 64 enum xe_guc_klv_threshold_index index, u32 value); 65 66int xe_gt_sriov_pf_config_set_fair(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs); 67int xe_gt_sriov_pf_config_sanitize(struct xe_gt *gt, unsigned int vfid, long timeout); 68int xe_gt_sriov_pf_config_release(struct xe_gt *gt, unsigned int vfid, bool force); 69int xe_gt_sriov_pf_config_push(struct xe_gt *gt, unsigned int vfid, bool refresh); 70 71ssize_t xe_gt_sriov_pf_config_save(struct xe_gt *gt, unsigned int vfid, void *buf, size_t size); 72int xe_gt_sriov_pf_config_restore(struct xe_gt *gt, unsigned int vfid, 73 const void *buf, size_t size); 74 75ssize_t xe_gt_sriov_pf_config_ggtt_save(struct xe_gt *gt, unsigned int vfid, 76 void *buf, size_t size); 77int xe_gt_sriov_pf_config_ggtt_restore(struct xe_gt *gt, unsigned int vfid, 78 const void *buf, size_t size); 79 80bool xe_gt_sriov_pf_config_is_empty(struct xe_gt *gt, unsigned int vfid); 81 82int xe_gt_sriov_pf_config_init(struct xe_gt *gt); 83void xe_gt_sriov_pf_config_restart(struct xe_gt *gt); 84 85int xe_gt_sriov_pf_config_print_ggtt(struct xe_gt *gt, struct drm_printer *p); 86int xe_gt_sriov_pf_config_print_ctxs(struct xe_gt *gt, struct drm_printer *p); 87int xe_gt_sriov_pf_config_print_dbs(struct xe_gt *gt, struct drm_printer *p); 88int xe_gt_sriov_pf_config_print_lmem(struct xe_gt *gt, struct drm_printer *p); 89 90int xe_gt_sriov_pf_config_print_available_ggtt(struct xe_gt *gt, struct drm_printer *p); 91 92#endif
~/
Read-only file preview.