[PATCH 2/2] drm/amdgpu: Advise if unable to resize BAR

Christian König ckoenig.leichtzumerken at gmail.com
Fri May 22 10:28:14 UTC 2020


Am 21.05.20 um 23:32 schrieb Alex Deucher:
> On Thu, May 21, 2020 at 4:45 PM Alan Swanson <reiver at improbability.net> wrote:
>> Even with the "Above 4G decoding" (or similar) BIOS option enabled,
>> many BIOS do not assign the PCI root bus a 64-bit address space.
>>
>> If available, "MMIOH Base" and "MMIO High Size" (or similar) BIOS
>> options should allow mapping to the desired address spaces.
>>
>> Signed-off-by: Alan Swanson <reiver at improbability.net>
>> ---
>> Useful to know why bar resizing isn't happening.
> This will spam a lot of people and probably cause confusion.  I'd
> prefer to drop this one.

Agreed, you can just look at /proc/iomem to figure out if resources 
above 4GB are available or not.

Christian.

>
> Alex
>
>
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index 2f0e8da7b..39a7f7212 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -919,8 +919,10 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
>>          }
>>
>>          /* Trying to resize is pointless without a root hub window above 4GB */
>> -       if (!res)
>> +       if (!res) {
>> +               DRM_INFO("Unable to resize BAR as PCI bus address space below 4GB.");
>>                  return 0;
>> +       }
>>
>>          /* Disable memory decoding while we change the BAR addresses and size */
>>          pci_read_config_word(adev->pdev, PCI_COMMAND, &cmd);
>> --
>> 2.26.2
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx



More information about the amd-gfx mailing list