[PATCH v3 2/9] drm/xe/sriov: Move VF bootstrap and query_config to vf_guc_init
Lucas De Marchi
lucas.demarchi at intel.com
Wed Jun 18 19:21:53 UTC 2025
On Tue, Jun 17, 2025 at 08:01:35PM +0200, Maarten Lankhorst wrote:
>We want to split up GUC init to an alloc and noalloc part to keep the
>init path the same for VF and !VF as much as possible.
>
>Everything in vf_guc_init should be done as early as possible, otherwise
>VRAM probing becomes impossible.
>
>Signed-off-by: Maarten Lankhorst <dev at lankhorst.se>
>---
> drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 1 -
> drivers/gpu/drm/xe/xe_guc.c | 9 +++++++++
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
>index 9b2fc9db55b8c..93cd26dca070f 100644
>--- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
>+++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
>@@ -966,7 +966,6 @@ u32 xe_gt_sriov_vf_read32(struct xe_gt *gt, struct xe_reg reg)
> struct vf_runtime_reg *rr;
>
> xe_gt_assert(gt, IS_SRIOV_VF(gt_to_xe(gt)));
>- xe_gt_assert(gt, gt->sriov.vf.pf_version.major);
> xe_gt_assert(gt, !reg.vf);
>
> if (reg.addr == GMD_ID.addr) {
>diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
>index 209e5d53c290c..81b22b6fb2493 100644
>--- a/drivers/gpu/drm/xe/xe_guc.c
>+++ b/drivers/gpu/drm/xe/xe_guc.c
>@@ -629,6 +629,7 @@ static int xe_guc_realloc_post_hwconfig(struct xe_guc *guc)
>
> static int vf_guc_init(struct xe_guc *guc)
> {
>+ struct xe_gt *gt = guc_to_gt(guc);
> int err;
>
> xe_guc_comm_init_early(guc);
>@@ -641,6 +642,14 @@ static int vf_guc_init(struct xe_guc *guc)
> if (err)
> return err;
>
>+ err = xe_gt_sriov_vf_bootstrap(gt);
not really following this... Commit message says *Move* but you are not
really moving. Did you squash something in the wrong patch?
The way it is here xe_gt_sriov_vf_bootstrap() would still be called
from xe_device_probe().
Lucas De Marchi
>+ if (err)
>+ return err;
>+
>+ err = xe_gt_sriov_vf_query_config(gt);
>+ if (err)
>+ return err;
>+
> return 0;
> }
>
>--
>2.45.2
>
More information about the Intel-xe
mailing list