mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
drm/xe/pf: Don't reprovision policies if already default
There is no need to send policy updates to the GuC if policies were not changed from the default settings (usually zero value). 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-7-michal.wajdeczko@intel.com
This commit is contained in:
parent
b23883a087
commit
689937c71c
|
|
@ -177,6 +177,9 @@ static int pf_reprovision_sched_if_idle(struct xe_gt *gt)
|
|||
xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt)));
|
||||
lockdep_assert_held(xe_gt_sriov_pf_master_mutex(gt));
|
||||
|
||||
if (!gt->sriov.pf.policy.guc.sched_if_idle)
|
||||
return 0;
|
||||
|
||||
return pf_provision_sched_if_idle(gt, gt->sriov.pf.policy.guc.sched_if_idle);
|
||||
}
|
||||
|
||||
|
|
@ -255,6 +258,9 @@ static int pf_reprovision_reset_engine(struct xe_gt *gt)
|
|||
xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt)));
|
||||
lockdep_assert_held(xe_gt_sriov_pf_master_mutex(gt));
|
||||
|
||||
if (!gt->sriov.pf.policy.guc.reset_engine)
|
||||
return 0;
|
||||
|
||||
return pf_provision_reset_engine(gt, gt->sriov.pf.policy.guc.reset_engine);
|
||||
}
|
||||
|
||||
|
|
@ -321,6 +327,9 @@ static int pf_reprovision_sample_period(struct xe_gt *gt)
|
|||
xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt)));
|
||||
lockdep_assert_held(xe_gt_sriov_pf_master_mutex(gt));
|
||||
|
||||
if (!gt->sriov.pf.policy.guc.sample_period)
|
||||
return 0;
|
||||
|
||||
return pf_provision_sample_period(gt, gt->sriov.pf.policy.guc.sample_period);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user