drm/xe/pf: Set VF LMEM BAR size
authorMichał Winiarski <michal.winiarski@intel.com>
Tue, 27 May 2025 12:06:37 +0000 (14:06 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 14 Aug 2025 14:30:53 +0000 (10:30 -0400)
commit94eae6ee4c2df2031bca586405e9ec36e0b9ccf8
tree3cdf0b5e9095f5032a93eb6bce207bfc463a6533
parent55d49f06162e45686399df4ae6292167f0deab7c
drm/xe/pf: Set VF LMEM BAR size

LMEM is partitioned between multiple VFs and we expect that the more
VFs we have, the less LMEM is assigned to each VF.
This means that we can achieve full LMEM BAR access without the need to
attempt full VF LMEM BAR resize via pci_resize_resource().

Always try to set the largest possible BAR size that allows to fit the
number of enabled VFs and inform the user in case the resize attempt is
not successful.

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20250527120637.665506-7-michal.winiarski@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
(cherry picked from commit 32a4d1b98e6663101fd0abfaf151c48feea7abb1)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/regs/xe_bars.h
drivers/gpu/drm/xe/xe_pci_sriov.c