/* * Return: 0 on success, -ENOKEY if some KLVs were not updated, -EPROTO if reply was malformed, * negative error code on failure.
*/ staticint pf_push_policy_buf_klvs(struct xe_gt *gt, u32 num_klvs, struct xe_guc_buf buf, u32 num_dwords)
{ int ret;
ret = pf_send_policy_klvs(gt, buf, num_dwords);
if (ret != num_klvs) { int err = ret < 0 ? ret : ret < num_klvs ? -ENOKEY : -EPROTO; struct drm_printer p = xe_gt_info_printer(gt); void *klvs = xe_guc_buf_cpu_ptr(buf);
/** * xe_gt_sriov_pf_policy_set_sched_if_idle - Control the 'sched_if_idle' policy. * @gt: the &xe_gt where to apply the policy * @enable: the value of the 'sched_if_idle' policy * * This function can only be called on PF. * * Return: 0 on success or a negative error code on failure.
*/ int xe_gt_sriov_pf_policy_set_sched_if_idle(struct xe_gt *gt, bool enable)
{ int err;
/** * xe_gt_sriov_pf_policy_get_sched_if_idle - Retrieve value of 'sched_if_idle' policy. * @gt: the &xe_gt where to read the policy from * * This function can only be called on PF. * * Return: value of 'sched_if_idle' policy.
*/ bool xe_gt_sriov_pf_policy_get_sched_if_idle(struct xe_gt *gt)
{ bool enable;
/** * xe_gt_sriov_pf_policy_set_reset_engine - Control the 'reset_engine' policy. * @gt: the &xe_gt where to apply the policy * @enable: the value of the 'reset_engine' policy * * This function can only be called on PF. * * Return: 0 on success or a negative error code on failure.
*/ int xe_gt_sriov_pf_policy_set_reset_engine(struct xe_gt *gt, bool enable)
{ int err;
/** * xe_gt_sriov_pf_policy_get_reset_engine - Retrieve value of 'reset_engine' policy. * @gt: the &xe_gt where to read the policy from * * This function can only be called on PF. * * Return: value of 'reset_engine' policy.
*/ bool xe_gt_sriov_pf_policy_get_reset_engine(struct xe_gt *gt)
{ bool enable;
/** * xe_gt_sriov_pf_policy_set_sample_period - Control the 'sample_period' policy. * @gt: the &xe_gt where to apply the policy * @value: the value of the 'sample_period' policy * * This function can only be called on PF. * * Return: 0 on success or a negative error code on failure.
*/ int xe_gt_sriov_pf_policy_set_sample_period(struct xe_gt *gt, u32 value)
{ int err;
/** * xe_gt_sriov_pf_policy_get_sample_period - Retrieve value of 'sample_period' policy. * @gt: the &xe_gt where to read the policy from * * This function can only be called on PF. * * Return: value of 'sample_period' policy.
*/
u32 xe_gt_sriov_pf_policy_get_sample_period(struct xe_gt *gt)
{
u32 value;
xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt)));
mutex_lock(xe_gt_sriov_pf_master_mutex(gt));
value = gt->sriov.pf.policy.guc.sample_period;
mutex_unlock(xe_gt_sriov_pf_master_mutex(gt));
/** * xe_gt_sriov_pf_policy_sanitize - Reset policy settings. * @gt: the &xe_gt * * This function can only be called on PF. * * Return: 0 on success or a negative error code on failure.
*/ void xe_gt_sriov_pf_policy_sanitize(struct xe_gt *gt)
{
mutex_lock(xe_gt_sriov_pf_master_mutex(gt));
pf_sanitize_guc_policies(gt);
mutex_unlock(xe_gt_sriov_pf_master_mutex(gt));
}
/** * xe_gt_sriov_pf_policy_reprovision - Reprovision (and optionally reset) policy settings. * @gt: the &xe_gt * @reset: if true will reprovision using default values instead of latest * * This function can only be called on PF. * * Return: 0 on success or a negative error code on failure.
*/ int xe_gt_sriov_pf_policy_reprovision(struct xe_gt *gt, bool reset)
{ int err = 0;
/** * xe_gt_sriov_pf_policy_print - Dump actual policy values. * @gt: the &xe_gt where to read the policy from * @p: the &drm_printer * * This function can only be called on PF. * * Return: 0 on success or a negative error code on failure.
*/ int xe_gt_sriov_pf_policy_print(struct xe_gt *gt, struct drm_printer *p)
{
xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt)));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.