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
Cc: Matt Roper <matthew.d.roper@intel.com>
Subject: [PATCH 1/8] drm/xe/vf: Assume fixed GSM size if VF
Date: Fri, 12 Jan 2024 16:26:42 +0100	[thread overview]
Message-ID: <20240112152649.849-2-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20240112152649.849-1-michal.wajdeczko@intel.com>

VFs can't use size mirrored from PCI config, but it should be
safe to assume it covers full 4GiB GGTT.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/xe/xe_ggtt.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 6fdf830678b3..ab96edb058d6 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -20,6 +20,7 @@
 #include "xe_gt_tlb_invalidation.h"
 #include "xe_map.h"
 #include "xe_mmio.h"
+#include "xe_sriov.h"
 #include "xe_wopcm.h"
 
 #define XELPG_GGTT_PTE_PAT0	BIT_ULL(52)
@@ -144,7 +145,11 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
 	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
 	unsigned int gsm_size;
 
-	gsm_size = probe_gsm_size(pdev);
+	if (IS_SRIOV_VF(xe))
+		gsm_size = SZ_8M; /* GGTT is expected to be 4GiB */
+	else
+		gsm_size = probe_gsm_size(pdev);
+
 	if (gsm_size == 0) {
 		drm_err(&xe->drm, "Hardware reported no preallocated GSM\n");
 		return -ENOMEM;
-- 
2.25.1


  reply	other threads:[~2024-01-12 15:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12 15:26 [PATCH 0/8] VF Tweaks Michal Wajdeczko
2024-01-12 15:26 ` Michal Wajdeczko [this message]
2024-01-13  1:13   ` [PATCH 1/8] drm/xe/vf: Assume fixed GSM size if VF Matt Roper
2024-01-12 15:26 ` [PATCH 2/8] drm/xe/vf: Don't try to capture engine data unavailable to VF Michal Wajdeczko
2024-01-12 21:15   ` Rodrigo Vivi
2024-01-12 15:26 ` [PATCH 3/8] drm/xe/vf: Don't program MOCS if VF Michal Wajdeczko
2024-01-13  0:54   ` Matt Roper
2024-01-12 15:26 ` [PATCH 4/8] drm/xe/vf: Don't initialize stolen memory manager " Michal Wajdeczko
2024-02-06 17:47   ` Matt Roper
2024-01-12 15:26 ` [PATCH 5/8] drm/xe/vf: Don't check if LMEM is initialized " Michal Wajdeczko
2024-01-13  4:37   ` Matt Roper
2024-01-12 15:26 ` [PATCH 6/8] drm/xe/vf: Don't enable hwmon " Michal Wajdeczko
2024-01-16 20:04   ` Nilawar, Badal
2024-01-12 15:26 ` [PATCH 7/8] drm/xe/vf: Don't program PAT " Michal Wajdeczko
2024-01-13  0:56   ` Matt Roper
2024-01-12 15:26 ` [PATCH 8/8] drm/xe/vf: Don't support MCR registers " Michal Wajdeczko
2024-01-13  1:11   ` Matt Roper
2024-01-12 15:30 ` ✓ CI.Patch_applied: success for VF Tweaks Patchwork
2024-01-12 15:30 ` ✓ CI.checkpatch: " Patchwork
2024-01-12 15:31 ` ✓ CI.KUnit: " Patchwork
2024-01-12 15:38 ` ✓ CI.Build: " Patchwork
2024-01-12 15:38 ` ✓ CI.Hooks: " Patchwork
2024-01-12 15:40 ` ✓ CI.checksparse: " Patchwork
2024-01-12 16:03 ` ✓ CI.BAT: " Patchwork

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=20240112152649.849-2-michal.wajdeczko@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    /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