Skip to content

Commit 2bd87f0

Browse files
committed
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 <[email protected]> Cc: Piotr Piórkowski <[email protected]> Reviewed-by: Piotr Piórkowski <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent d69300a commit 2bd87f0

File tree

5 files changed

+1305
-15
lines changed

5 files changed

+1305
-15
lines changed

drivers/gpu/drm/xe/xe_gt_sriov_pf.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "xe_gt_sriov_pf.h"
1111
#include "xe_gt_sriov_pf_config.h"
12+
#include "xe_gt_sriov_pf_control.h"
1213
#include "xe_gt_sriov_pf_helpers.h"
1314
#include "xe_gt_sriov_pf_service.h"
1415
#include "xe_mmio.h"
@@ -57,6 +58,10 @@ int xe_gt_sriov_pf_init_early(struct xe_gt *gt)
5758
if (err)
5859
return err;
5960

61+
err = xe_gt_sriov_pf_control_init(gt);
62+
if (err)
63+
return err;
64+
6065
return 0;
6166
}
6267

@@ -93,4 +98,5 @@ void xe_gt_sriov_pf_init_hw(struct xe_gt *gt)
9398
void xe_gt_sriov_pf_restart(struct xe_gt *gt)
9499
{
95100
xe_gt_sriov_pf_config_restart(gt);
101+
xe_gt_sriov_pf_control_restart(gt);
96102
}

0 commit comments

Comments
 (0)