[PATCH 04/12] drm/xe/pf: Improve VF control

Piotr Piórkowski piotr.piorkowski at intel.com
Fri Aug 16 13:06:04 UTC 2024


Michal Wajdeczko <michal.wajdeczko at intel.com> wrote on pią [2024-sie-09 18:51:51 +0200]:
> Our initial VF control implementation was focused on providing
> a very minimal support for the VF_STATE_NOTIFY events just to
> meet GuC requirements, without tracking a VF state or doing any
> expected actions (like cleanup in case of the FLR notification).
> 
> Try to improve this by defining set of VF state machines, each
> responsible for processing one activity (PAUSE, RESUME, STOP or
> FLR). All required steps defined by the VF state machine are then
> executed by the PF worker from the dedicated workqueue.
> 
> Any external requests or notifications simply try to transition
> between the states to trigger a work and then wait for that work
> to finish. Some predefined default timeouts are used to avoid
> changing existing API calls, but it should be easy to extend the
> control API to also accept specific timeout values.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Piotr Piórkowski <piotr.piorkowski at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_gt_sriov_pf.c           |    6 +
>  drivers/gpu/drm/xe/xe_gt_sriov_pf_control.c   | 1203 ++++++++++++++++-
>  drivers/gpu/drm/xe/xe_gt_sriov_pf_control.h   |    3 +
>  .../gpu/drm/xe/xe_gt_sriov_pf_control_types.h |  107 ++
>  drivers/gpu/drm/xe/xe_gt_sriov_pf_types.h     |    6 +
>  5 files changed, 1310 insertions(+), 15 deletions(-)
>  create mode 100644 drivers/gpu/drm/xe/xe_gt_sriov_pf_control_types.h
> 


<snip>

> @@ -284,3 +1295,165 @@ int xe_gt_sriov_pf_control_process_guc2pf(struct xe_gt *gt, const u32 *msg, u32
>  
>  	return vfid ? pf_handle_vf_event(gt, vfid, eventid) : pf_handle_pf_event(gt, eventid);
>  }
> +
> +static bool pf_process_vf_machine(struct xe_gt *gt, unsigned int vfid)
> +{
> +	if (pf_exit_vf_flr_send_start(gt, vfid))
> +		return true;
> +
> +	if (pf_exit_vf_flr_send_start(gt, vfid))
> +		return true;


hmmm... Should we call out this function twice here ? 



Thanks,
Piotr

> -- 
> 2.43.0
> 

-- 


More information about the Intel-xe mailing list