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>
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;
}