]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe/pf: Improve VF control
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Wed, 28 Aug 2024 21:08:09 +0000 (23:08 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 30 Aug 2024 08:51:09 +0000 (10:51 +0200)
commit2bd87f0fc24ae29ead9808d341497f465b339c0a
tree71817a9eae995e4776f8e2b7d0b34f6473d07805
parentd69300abc2dec930fd280a013984150ae7c6a386
drm/xe/pf: Improve VF control

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@intel.com>
Cc: Piotr Piórkowski <piotr.piorkowski@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240828210809.1528-5-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_gt_sriov_pf.c
drivers/gpu/drm/xe/xe_gt_sriov_pf_control.c
drivers/gpu/drm/xe/xe_gt_sriov_pf_control.h
drivers/gpu/drm/xe/xe_gt_sriov_pf_control_types.h [new file with mode: 0644]
drivers/gpu/drm/xe/xe_gt_sriov_pf_types.h