Skip to content

amdgpu, pci: improved BAR resizing support

Darren Salt amd-gfx 1 version NAK

Status from this message: NAK, that is exactly what we are trying to avoid.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 8 repliesNAK

Patches in v1

#Subject and filesSizeRepliesApplied
1/7pci: export PCI BAR size-reading functionsdrivers/pci/pci.c drivers/pci/pci.h include/linux/pci.h+6 -21 reply
2/7pci: add BAR bytes->size helper & expose size->bytes helperdrivers/pci/pci.h include/linux/pci.h+9 -40 replies
3/7amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM (v2)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+43 -106 replies
4/7amdgpu: module option controlling whether BAR0 resizing is donedrivers/gpu/drm/amd/amdgpu/amdgpu.h drivers/gpu/drm/amd/amdgpu/amdgpu_device.c drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+13 -01 reply
5/7amdgpu: limit maximum FB BAR size when attempting to enlargedrivers/gpu/drm/amd/amdgpu/amdgpu.h drivers/gpu/drm/amd/amdgpu/amdgpu_device.c drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+17 -10 replies
6/7pci: allow for overriding the list of advertised BAR sizesdrivers/pci/setup-res.c include/linux/pci.h+3 -30 replies
7/7amdgpu: allow overriding of the GPU's list of supported BAR sizesdrivers/gpu/drm/amd/amdgpu/amdgpu.h drivers/gpu/drm/amd/amdgpu/amdgpu_device.c drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+8 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] amdgpu, pci: improved BAR resizing support

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; they apply to all dGPUs driven by amdgpu.

The override is to cope with GPU VBIOSes which don't properly advertise supported BAR sizes. This should be quirked somehow; I have yet to determine how this should be arranged.

Darren Salt (7):
pci: export PCI BAR size-reading functions
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 (v2)
amdgpu: module option controlling whether BAR0 resizing is done
amdgpu: limit maximum FB BAR size when attempting to enlarge
pci: allow for overriding the list of advertised BAR sizes
amdgpu: allow overriding of the GPU's list of supported BAR sizes

 drivers/gpu/drm/amd/amdgpu/amdgpu.h        |  2 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 63 ++++++++++++++++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 18 +++++++
 drivers/pci/pci.c                          |  2 +
 drivers/pci/pci.h                          |  6 ---
 drivers/pci/setup-res.c                    |  4 +-
 include/linux/pci.h                        | 15 +++++-
 7 files changed, 91 insertions(+), 19 deletions(-)
Signature · 6 lines
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx