]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/xe/vf: Read VF configuration prior to GGTT initialization
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 24 May 2024 11:37:13 +0000 (13:37 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 27 May 2024 16:46:26 +0000 (18:46 +0200)
Each VF will be assigned with only a limited range of the GGTT
address space. Make sure that VF driver will read its own GGTT
configuration before starting any GGTT initialization.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: MichaƂ Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240524113714.932-2-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_device.c

index 2eba1e32c63386ae9fcac084403b9a5c6f861c09..b2d5c7341238e07a832d8a7ec6bedc32610cc400 100644 (file)
@@ -34,6 +34,8 @@
 #include "xe_gt.h"
 #include "xe_gt_mcr.h"
 #include "xe_gt_printk.h"
+#include "xe_gt_sriov_vf.h"
+#include "xe_guc.h"
 #include "xe_hwmon.h"
 #include "xe_irq.h"
 #include "xe_memirq.h"
@@ -568,6 +570,15 @@ int xe_device_probe(struct xe_device *xe)
        }
 
        for_each_tile(tile, xe, id) {
+               if (IS_SRIOV_VF(xe)) {
+                       xe_guc_comm_init_early(&tile->primary_gt->uc.guc);
+                       err = xe_gt_sriov_vf_bootstrap(tile->primary_gt);
+                       if (err)
+                               return err;
+                       err = xe_gt_sriov_vf_query_config(tile->primary_gt);
+                       if (err)
+                               return err;
+               }
                err = xe_ggtt_init_early(tile->mem.ggtt);
                if (err)
                        return err;