[PATCH 1/8] drm/xe/vf: Assume fixed GSM size if VF
Matt Roper
matthew.d.roper at intel.com
Sat Jan 13 01:13:17 UTC 2024
On Fri, Jan 12, 2024 at 04:26:42PM +0100, Michal Wajdeczko wrote:
> 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 at intel.com>
> Cc: Matt Roper <matthew.d.roper at intel.com>
Matches bspec 70494 & 50588.
Reviewed-by: Matt Roper <matthew.d.roper at 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
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
More information about the Intel-xe
mailing list