mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
drm/xe/pf: Reprovision policy settings after GT reset
In addition to the reprovisioning of individual VFs configurations, we should also reprovision GuC global policy settings. Note that we already had a draft function for that but we missed to call it once we started handling GT reset. Reuse it now but don't take extra RPM as this is now a caller responsibility and drop unused parameter. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Link: https://patch.msgid.link/20260402191726.4932-6-michal.wajdeczko@intel.com
This commit is contained in:
parent
980bb387fb
commit
b23883a087
|
|
@ -219,6 +219,7 @@ static void pf_restart(struct xe_gt *gt)
|
|||
|
||||
xe_gt_assert(gt, !xe_pm_runtime_suspended(xe));
|
||||
|
||||
xe_gt_sriov_pf_policy_restart(gt);
|
||||
xe_gt_sriov_pf_config_restart(gt);
|
||||
xe_gt_sriov_pf_control_restart(gt);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#include "xe_guc_ct.h"
|
||||
#include "xe_guc_klv_helpers.h"
|
||||
#include "xe_guc_submit.h"
|
||||
#include "xe_pm.h"
|
||||
|
||||
/*
|
||||
* Return: number of KLVs that were successfully parsed and saved,
|
||||
|
|
@ -692,30 +691,23 @@ void xe_gt_sriov_pf_policy_sanitize(struct xe_gt *gt)
|
|||
}
|
||||
|
||||
/**
|
||||
* xe_gt_sriov_pf_policy_reprovision - Reprovision (and optionally reset) policy settings.
|
||||
* xe_gt_sriov_pf_policy_restart() - Reprovision 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 xe_gt_sriov_pf_policy_restart(struct xe_gt *gt)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
xe_pm_runtime_get_noresume(gt_to_xe(gt));
|
||||
guard(mutex)(xe_gt_sriov_pf_master_mutex(gt));
|
||||
|
||||
mutex_lock(xe_gt_sriov_pf_master_mutex(gt));
|
||||
if (reset)
|
||||
pf_sanitize_guc_policies(gt);
|
||||
err |= pf_reprovision_sched_if_idle(gt);
|
||||
err |= pf_reprovision_reset_engine(gt);
|
||||
err |= pf_reprovision_sample_period(gt);
|
||||
err |= pf_reprovision_sched_groups(gt);
|
||||
mutex_unlock(xe_gt_sriov_pf_master_mutex(gt));
|
||||
|
||||
xe_pm_runtime_put(gt_to_xe(gt));
|
||||
|
||||
return err ? -ENXIO : 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ bool xe_gt_sriov_pf_policy_sched_groups_enabled(struct xe_gt *gt);
|
|||
|
||||
void xe_gt_sriov_pf_policy_init(struct xe_gt *gt);
|
||||
void xe_gt_sriov_pf_policy_sanitize(struct xe_gt *gt);
|
||||
int xe_gt_sriov_pf_policy_reprovision(struct xe_gt *gt, bool reset);
|
||||
int xe_gt_sriov_pf_policy_restart(struct xe_gt *gt);
|
||||
int xe_gt_sriov_pf_policy_print(struct xe_gt *gt, struct drm_printer *p);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user