Commit 25275c8a authored by Michal Wajdeczko's avatar Michal Wajdeczko

drm/xe/vf: Custom hardware config load step if VF

The VF drivers may immediately communicate with the GuC to obtain
the hardware config since the firmware shall already be running.

With the GuC communication established, VFs can also obtain the
values of the runtime registers (fuses) from the PF driver.
Reviewed-by: default avatarPiotr Piórkowski <piotr.piorkowski@intel.com>
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240516110546.2216-6-michal.wajdeczko@intel.com
parent f2345ed5
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "xe_force_wake.h" #include "xe_force_wake.h"
#include "xe_gt.h" #include "xe_gt.h"
#include "xe_gt_printk.h" #include "xe_gt_printk.h"
#include "xe_gt_sriov_vf.h"
#include "xe_guc_ads.h" #include "xe_guc_ads.h"
#include "xe_guc_ct.h" #include "xe_guc_ct.h"
#include "xe_guc_db_mgr.h" #include "xe_guc_db_mgr.h"
...@@ -547,6 +548,38 @@ static int __xe_guc_upload(struct xe_guc *guc) ...@@ -547,6 +548,38 @@ static int __xe_guc_upload(struct xe_guc *guc)
return 0 /* FIXME: ret, don't want to stop load currently */; return 0 /* FIXME: ret, don't want to stop load currently */;
} }
static int vf_guc_min_load_for_hwconfig(struct xe_guc *guc)
{
struct xe_gt *gt = guc_to_gt(guc);
int ret;
ret = xe_gt_sriov_vf_bootstrap(gt);
if (ret)
return ret;
ret = xe_gt_sriov_vf_query_config(gt);
if (ret)
return ret;
ret = xe_guc_hwconfig_init(guc);
if (ret)
return ret;
ret = xe_guc_enable_communication(guc);
if (ret)
return ret;
ret = xe_gt_sriov_vf_connect(gt);
if (ret)
return ret;
ret = xe_gt_sriov_vf_query_runtime(gt);
if (ret)
return ret;
return 0;
}
/** /**
* xe_guc_min_load_for_hwconfig - load minimal GuC and read hwconfig table * xe_guc_min_load_for_hwconfig - load minimal GuC and read hwconfig table
* @guc: The GuC object * @guc: The GuC object
...@@ -562,6 +595,9 @@ int xe_guc_min_load_for_hwconfig(struct xe_guc *guc) ...@@ -562,6 +595,9 @@ int xe_guc_min_load_for_hwconfig(struct xe_guc *guc)
{ {
int ret; int ret;
if (IS_SRIOV_VF(guc_to_xe(guc)))
return vf_guc_min_load_for_hwconfig(guc);
xe_guc_ads_populate_minimal(&guc->ads); xe_guc_ads_populate_minimal(&guc->ads);
/* Raise GT freq to speed up HuC/GuC load */ /* Raise GT freq to speed up HuC/GuC load */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment