#include <drm/drm_managed.h>
#include "abi/guc_actions_sriov_abi.h"
#include "xe_device.h"
#include "xe_gt.h"
#include "xe_gt_sriov_pf_config.h"
#include "xe_gt_sriov_pf_control.h"
#include "xe_gt_sriov_pf_helpers.h"
#include "xe_gt_sriov_pf_monitor.h"
#include "xe_gt_sriov_pf_service.h"
#include "xe_gt_sriov_printk.h"
#include "xe_guc_ct.h"
#include "xe_sriov.h"
static const char *control_cmd_to_string(u32 cmd)
{ … }
static int guc_action_vf_control_cmd(struct xe_guc *guc, u32 vfid, u32 cmd)
{ … }
static int pf_send_vf_control_cmd(struct xe_gt *gt, unsigned int vfid, u32 cmd)
{ … }
static int pf_send_vf_pause(struct xe_gt *gt, unsigned int vfid)
{ … }
static int pf_send_vf_resume(struct xe_gt *gt, unsigned int vfid)
{ … }
static int pf_send_vf_stop(struct xe_gt *gt, unsigned int vfid)
{ … }
static int pf_send_vf_flr_start(struct xe_gt *gt, unsigned int vfid)
{ … }
static int pf_send_vf_flr_finish(struct xe_gt *gt, unsigned int vfid)
{ … }
#ifdef CONFIG_DRM_XE_DEBUG_SRIOV
static const char *control_bit_to_string(enum xe_gt_sriov_control_bits bit)
{ … }
#endif
static unsigned long pf_get_default_timeout(enum xe_gt_sriov_control_bits bit)
{ … }
static struct xe_gt_sriov_control_state *pf_pick_vf_control(struct xe_gt *gt, unsigned int vfid)
{ … }
static unsigned long *pf_peek_vf_state(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_check_vf_state(struct xe_gt *gt, unsigned int vfid,
enum xe_gt_sriov_control_bits bit)
{ … }
static void pf_dump_vf_state(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_expect_vf_state(struct xe_gt *gt, unsigned int vfid,
enum xe_gt_sriov_control_bits bit)
{ … }
static bool pf_expect_vf_not_state(struct xe_gt *gt, unsigned int vfid,
enum xe_gt_sriov_control_bits bit)
{ … }
static bool pf_enter_vf_state(struct xe_gt *gt, unsigned int vfid,
enum xe_gt_sriov_control_bits bit)
{ … }
static bool pf_exit_vf_state(struct xe_gt *gt, unsigned int vfid,
enum xe_gt_sriov_control_bits bit)
{ … }
static void pf_escape_vf_state(struct xe_gt *gt, unsigned int vfid,
enum xe_gt_sriov_control_bits bit)
{ … }
static void pf_enter_vf_mismatch(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_exit_vf_mismatch(struct xe_gt *gt, unsigned int vfid)
{ … }
#define pf_enter_vf_state_machine_bug(gt, vfid) …
static void pf_queue_control_worker(struct xe_gt *gt)
{ … }
static void pf_queue_vf(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_exit_vf_flr_wip(struct xe_gt *gt, unsigned int vfid);
static void pf_exit_vf_stop_wip(struct xe_gt *gt, unsigned int vfid);
static void pf_exit_vf_pause_wip(struct xe_gt *gt, unsigned int vfid);
static void pf_exit_vf_resume_wip(struct xe_gt *gt, unsigned int vfid);
static bool pf_enter_vf_wip(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_exit_vf_wip(struct xe_gt *gt, unsigned int vfid)
{ … }
static int pf_wait_vf_wip_done(struct xe_gt *gt, unsigned int vfid, unsigned long timeout)
{ … }
static void pf_enter_vf_ready(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_exit_vf_pause_wip(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_paused(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_pause_completed(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_pause_failed(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_pause_rejected(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_vf_pause_guc_done(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_pause_guc_done(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_pause_wait_guc(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_pause_wait_guc(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_pause_send_pause(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_vf_pause_send_pause(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_enter_vf_pause_wip(struct xe_gt *gt, unsigned int vfid)
{ … }
int xe_gt_sriov_pf_control_pause_vf(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_exit_vf_resume_wip(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_resumed(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_resume_completed(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_resume_failed(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_resume_rejected(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_resume_send_resume(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_vf_resume_send_resume(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_enter_vf_resume_wip(struct xe_gt *gt, unsigned int vfid)
{ … }
int xe_gt_sriov_pf_control_resume_vf(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_exit_vf_stop_wip(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_stopped(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_stop_completed(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_stop_failed(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_stop_rejected(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_stop_send_stop(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_vf_stop_send_stop(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_enter_vf_stop_wip(struct xe_gt *gt, unsigned int vfid)
{ … }
int xe_gt_sriov_pf_control_stop_vf(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_flr_send_start(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_flr_wip(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_exit_vf_flr_wip(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_flr_completed(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_flr_failed(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_flr_rejected(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_flr_send_finish(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_vf_flr_send_finish(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_flr_reset_mmio(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_vf_flr_reset_mmio(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_flr_reset_data(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_vf_flr_reset_data(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_flr_reset_config(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_vf_flr_reset_config(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_flr_wait_guc(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_vf_flr_wait_guc(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_vf_flr_send_start(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool pf_exit_vf_flr_guc_done(struct xe_gt *gt, unsigned int vfid)
{ … }
static void pf_enter_vf_flr_guc_done(struct xe_gt *gt, unsigned int vfid)
{ … }
int xe_gt_sriov_pf_control_trigger_flr(struct xe_gt *gt, unsigned int vfid)
{ … }
static bool needs_dispatch_flr(struct xe_device *xe)
{ … }
static void pf_handle_vf_flr(struct xe_gt *gt, u32 vfid)
{ … }
static void pf_handle_vf_flr_done(struct xe_gt *gt, u32 vfid)
{ … }
static void pf_handle_vf_pause_done(struct xe_gt *gt, u32 vfid)
{ … }
static int pf_handle_vf_event(struct xe_gt *gt, u32 vfid, u32 eventid)
{ … }
static int pf_handle_pf_event(struct xe_gt *gt, u32 eventid)
{ … }
int xe_gt_sriov_pf_control_process_guc2pf(struct xe_gt *gt, const u32 *msg, u32 len)
{ … }
static bool pf_process_vf_state_machine(struct xe_gt *gt, unsigned int vfid)
{ … }
static unsigned int pf_control_state_index(struct xe_gt *gt,
struct xe_gt_sriov_control_state *cs)
{ … }
static void pf_worker_find_work(struct xe_gt *gt)
{ … }
static void control_worker_func(struct work_struct *w)
{ … }
static void pf_stop_worker(struct xe_gt *gt)
{ … }
static void control_fini_action(struct drm_device *dev, void *data)
{ … }
int xe_gt_sriov_pf_control_init(struct xe_gt *gt)
{ … }
void xe_gt_sriov_pf_control_restart(struct xe_gt *gt)
{ … }