Skip to contentSkip to conversation

amdgpu: don't treat BAR resize failure due to unsupported requested size as an error

PATCH In review Darren Salt 2 participants 2 messages Dec 9, 2020 – Dec 10, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amdgpu: don't treat BAR resize failure due to unsupported requested size as an error

On the resize attempt failing with -EINVAL, instead report an informational message indicating that the requested BAR size is not listed as supported by the VBIOS.

Without this, as I have an RX 5600 XT which lists only 256MB, 512MB and 1024MB as supported, I see
[drm:amdgpu_device_resize_fb_bar] *ERROR* Problem resizing BAR0 (-22).

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
index 355fa0057c26..d80ba03913a7 100644
@@ -1136,6 +1136,8 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
 	r = pci_resize_resource(adev->pdev, 0, rbar_size);
 	if (r == -ENOSPC)
 		DRM_INFO("Not enough PCI address space for a large BAR.");
+	else if (r == -EINVAL)
+		DRM_INFO("VBIOS does not support exposing all VRAM via a large BAR.");
 	else if (r && r != -ENOTSUPP)
 		DRM_ERROR("Problem resizing BAR0 (%d).", r);
 
Signature · 6 lines
2.20.1

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

Am 09.12.20 um 19:55 schrieb Darren Salt:

Quoted 7 lines

On the resize attempt failing with -EINVAL, instead report an informational message indicating that the requested BAR size is not listed as supported by the VBIOS.

Without this, as I have an RX 5600 XT which lists only 256MB, 512MB and 1024MB as supported, I see
[drm:amdgpu_device_resize_fb_bar] *ERROR* Problem resizing BAR0 (-22).

Well NAK, we just recently discussed that internally and the key point is that we should not have tried to resize things in the first place since that means a lot of churn for the PCIe subsystem.

So this is really an error and we should try to avoid it.

But the fact that you run into this in the first place is really interesting, I thought we haven't sold hardware with that configuration yet.

Regards,
Christian.

Quoted 11 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 355fa0057c26..d80ba03913a7 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev) · line 1143

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
@@ -1136,6 +1136,8 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
  	r = pci_resize_resource(adev->pdev, 0, rbar_size);
  	if (r == -ENOSPC)
  		DRM_INFO("Not enough PCI address space for a large BAR.");
+	else if (r == -EINVAL)
+		DRM_INFO("VBIOS does not support exposing all VRAM via a large BAR.");
  	else if (r && r != -ENOTSUPP)
  		DRM_ERROR("Problem resizing BAR0 (%d).", r);
 

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