Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [PATCH 1/2] drm/xe/vf: Read VF configuration prior to GGTT initialization
Date: Fri, 24 May 2024 13:37:13 +0200	[thread overview]
Message-ID: <20240524113714.932-2-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20240524113714.932-1-michal.wajdeczko@intel.com>

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>
---
 drivers/gpu/drm/xe/xe_device.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 5acf2c92789f..f04b11e45c2d 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -35,6 +35,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"
@@ -569,6 +571,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;
-- 
2.43.0


  reply	other threads:[~2024-05-24 11:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24 11:37 [PATCH 0/2] VF: Use only assigned GGTT region Michal Wajdeczko
2024-05-24 11:37 ` Michal Wajdeczko [this message]
2024-05-27  7:33   ` [PATCH 1/2] drm/xe/vf: Read VF configuration prior to GGTT initialization Michał Winiarski
2024-05-24 11:37 ` [PATCH 2/2] drm/xe/vf: Use only assigned GGTT region Michal Wajdeczko
2024-05-27  7:51   ` Michał Winiarski
2024-05-27 11:20   ` [PATCH v2 " Michal Wajdeczko
2024-05-24 11:42 ` ✓ CI.Patch_applied: success for VF: " Patchwork
2024-05-24 11:42 ` ✓ CI.checkpatch: " Patchwork
2024-05-24 11:43 ` ✓ CI.KUnit: " Patchwork
2024-05-24 11:55 ` ✓ CI.Build: " Patchwork
2024-05-24 11:58 ` ✓ CI.Hooks: " Patchwork
2024-05-24 11:59 ` ✓ CI.checksparse: " Patchwork
2024-05-24 12:30 ` ✗ CI.BAT: failure " Patchwork
2024-05-27 11:23 ` ✗ CI.FULL: " Patchwork
2024-05-27 11:25 ` ✓ CI.Patch_applied: success for VF: Use only assigned GGTT region (rev2) Patchwork
2024-05-27 11:26 ` ✓ CI.checkpatch: " Patchwork
2024-05-27 11:27 ` ✓ CI.KUnit: " Patchwork
2024-05-27 11:38 ` ✓ CI.Build: " Patchwork
2024-05-27 11:39 ` ✗ CI.Hooks: failure " Patchwork
2024-05-27 11:40 ` ✓ CI.checksparse: success " Patchwork
2024-05-27 12:02 ` ✓ CI.BAT: " Patchwork
2024-05-27 13:00 ` ✗ CI.FULL: failure " Patchwork
2024-05-27 16:13   ` Michal Wajdeczko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240524113714.932-2-michal.wajdeczko@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox