drm/xe: fix xe_mmio_total_vram_size

As also cause issue on PVC, moving back
to what we did before stolen was
introduced

Signed-off-by: Philippe Lecluse <philippe.lecluse@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Philippe Lecluse 2023-01-13 14:07:17 +00:00 committed by Rodrigo Vivi
parent d873150072
commit 760f168db3

View File

@ -159,12 +159,8 @@ int xe_mmio_total_vram_size(struct xe_device *xe, u64 *vram_size, u64 *usable_si
if (!xe->info.has_flat_ccs) {
*vram_size = pci_resource_len(pdev, GEN12_LMEM_BAR);
if (usable_size) {
if (xe->info.platform == XE_DG1)
*usable_size = xe_mmio_read64(gt, GEN12_GSMBASE.reg);
else
*usable_size = *vram_size;
}
if (usable_size)
*usable_size = min(*vram_size, xe_mmio_read64(gt, GEN12_GSMBASE.reg));
return 0;
}