mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
We already have function to configure PF (or VF) scheduling priority on a single GT, but we also need function that will cover all tiles and GTs. However, due to the current GuC FW limitation, we can't always rely on per-GT function as it actually only works for the PF case. The only way to change VFs scheduling priority is to use 'sched_if_idle' policy KLV that will change priorities for all VFs (and the PF). We will use these new functions in the upcoming patches. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Link: https://patch.msgid.link/20251030222348.186658-12-michal.wajdeczko@intel.com
46 lines
1.6 KiB
C
46 lines
1.6 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2025 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_SRIOV_PF_PROVISION_H_
|
|
#define _XE_SRIOV_PF_PROVISION_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include "xe_sriov_pf_provision_types.h"
|
|
|
|
struct xe_device;
|
|
|
|
int xe_sriov_pf_provision_bulk_apply_eq(struct xe_device *xe, u32 eq);
|
|
int xe_sriov_pf_provision_apply_vf_eq(struct xe_device *xe, unsigned int vfid, u32 eq);
|
|
int xe_sriov_pf_provision_query_vf_eq(struct xe_device *xe, unsigned int vfid, u32 *eq);
|
|
|
|
int xe_sriov_pf_provision_bulk_apply_pt(struct xe_device *xe, u32 pt);
|
|
int xe_sriov_pf_provision_apply_vf_pt(struct xe_device *xe, unsigned int vfid, u32 pt);
|
|
int xe_sriov_pf_provision_query_vf_pt(struct xe_device *xe, unsigned int vfid, u32 *pt);
|
|
|
|
int xe_sriov_pf_provision_bulk_apply_priority(struct xe_device *xe, u32 prio);
|
|
int xe_sriov_pf_provision_apply_vf_priority(struct xe_device *xe, unsigned int vfid, u32 prio);
|
|
int xe_sriov_pf_provision_query_vf_priority(struct xe_device *xe, unsigned int vfid, u32 *prio);
|
|
|
|
int xe_sriov_pf_provision_vfs(struct xe_device *xe, unsigned int num_vfs);
|
|
int xe_sriov_pf_unprovision_vfs(struct xe_device *xe, unsigned int num_vfs);
|
|
|
|
int xe_sriov_pf_provision_set_mode(struct xe_device *xe, enum xe_sriov_provisioning_mode mode);
|
|
|
|
/**
|
|
* xe_sriov_pf_provision_set_custom_mode() - Change VFs provision mode to custom.
|
|
* @xe: the PF &xe_device
|
|
*
|
|
* This function can only be called on PF.
|
|
*
|
|
* Return: 0 on success or a negative error code on failure.
|
|
*/
|
|
static inline int xe_sriov_pf_provision_set_custom_mode(struct xe_device *xe)
|
|
{
|
|
return xe_sriov_pf_provision_set_mode(xe, XE_SRIOV_PROVISIONING_MODE_CUSTOM);
|
|
}
|
|
|
|
#endif
|