* [PATCH] amdgpu: don't treat BAR resize failure due to unsupported requested size as an error
@ 2020-12-09 18:55 Darren Salt
2020-12-10 10:04 ` Christian König
0 siblings, 1 reply; 2+ messages in thread
From: Darren Salt @ 2020-12-09 18:55 UTC (permalink / raw)
To: amd-gfx; +Cc: Darren Salt
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).
Signed-off-by: Darren Salt <devspam@moreofthesa.me.uk>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 355fa0057c26..d80ba03913a7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -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);
--
2.20.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] amdgpu: don't treat BAR resize failure due to unsupported requested size as an error
2020-12-09 18:55 [PATCH] amdgpu: don't treat BAR resize failure due to unsupported requested size as an error Darren Salt
@ 2020-12-10 10:04 ` Christian König
0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2020-12-10 10:04 UTC (permalink / raw)
To: Darren Salt, amd-gfx
Am 09.12.20 um 19:55 schrieb Darren Salt:
> 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.
>
> Signed-off-by: Darren Salt <devspam@moreofthesa.me.uk>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 355fa0057c26..d80ba03913a7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-10 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-09 18:55 [PATCH] amdgpu: don't treat BAR resize failure due to unsupported requested size as an error Darren Salt
2020-12-10 10:04 ` Christian König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox