lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 16 Aug 2023 11:44:48 +0200
From:   Christian König <ckoenig.leichtzumerken@...il.com>
To:     Alex Deucher <alexdeucher@...il.com>, hongao <hongao@...ontech.com>
Cc:     Xinhui.Pan@....com, amd-gfx@...ts.freedesktop.org,
        lijo.lazar@....com, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, mario.limonciello@....com,
        daniel@...ll.ch, alexander.deucher@....com, airlied@...il.com
Subject: Re: [PATCH] drm/amdgpu/gmc6: fix in case the PCI BAR is larger than
 the actual amount of vram

Wait a second.

This is unnecessary because we have this check in 
amdgpu_gmc_vram_location():

         if (mc->real_vram_size < mc->visible_vram_size)
                 mc->visible_vram_size = mc->real_vram_size;


Which makes sure that the visible VRAM size is never larger than the 
actual size for all HW generations.

Regards,
Christian.

Am 15.08.23 um 17:50 schrieb Alex Deucher:
> Applied.  Thanks!
>
> On Tue, Aug 15, 2023 at 3:13 AM hongao <hongao@...ontech.com> wrote:
>> [why]
>> limit visible_vram_size to real_vram_size in case
>> the PCI BAR is larger than the actual amount of vram.
>>
>> Signed-off-by: hongao <hongao@...ontech.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
>> index b7dad4e67813..c0de7496bfd1 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
>> @@ -320,6 +320,8 @@ static int gmc_v6_0_mc_init(struct amdgpu_device *adev)
>>          adev->gmc.aper_base = pci_resource_start(adev->pdev, 0);
>>          adev->gmc.aper_size = pci_resource_len(adev->pdev, 0);
>>          adev->gmc.visible_vram_size = adev->gmc.aper_size;
>> +       if (adev->gmc.visible_vram_size > adev->gmc.real_vram_size)
>> +               adev->gmc.visible_vram_size = adev->gmc.real_vram_size;
>>
>>          /* set the gart size */
>>          if (amdgpu_gart_size == -1) {
>> --
>> 2.20.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ