[PATCH 0/8] amdgpu, pci: improved BAR resizing support
Darren Salt
devspam at moreofthesa.me.uk
Sun Dec 13 22:53:15 UTC 2020
This patch series improves the existing BAR resizing support in amdgpu. By
default, it will attempt to resize BAR0 for each dGPU present to cover the
VRAM, falling back to smaller sizes if necessary, e.g. if there's not enough
address space remaining or support for the size is not advertised.
Basic boot-time (or module load time) options to control this resizing are
implemented: one to control whether resizing is done (and whether the
advertised BAR sizes are ignored) and one to control the maximum BAR size
(where the size would be increased). At present, these are coarse; there is
no support for applying limits to specific GPUs in multi-GPU systems.
The override and the quirks list (which uses it) are to cope with GPU
VBIOSes which don't properly advertise supported BAR sizes. Mine appears to
be one such.
Darren Salt (8):
pci: export pci_rebar_get_possible_sizes
pci: add BAR bytes->size helper & expose size->bytes helper
amdgpu: resize BAR0 to the maximum available size, even if it doesn't
cover VRAM (v4)
amdgpu: limit maximum BAR0 size when attempting to enlarge (v2)
pci: allow for overriding the list of advertised BAR sizes
amdgpu: allow overriding of the GPU's list of supported BAR sizes (v3)
amdgpu: implement a BAR size quirks list
amdgpu: add a BAR size quirk for Sapphire RX 5600 XT Pulse.
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 115 +++++++++++++++++++--
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 19 ++++
drivers/pci/pci.c | 1 +
drivers/pci/pci.h | 5 -
drivers/pci/setup-res.c | 4 +-
include/linux/pci.h | 12 ++-
7 files changed, 140 insertions(+), 18 deletions(-)
--
2.20.1
More information about the amd-gfx
mailing list