[PATCH 1/2] drm/amdgpu/gmc: always steal the first 32MB of vram for fw hand-over

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-04-05 09:27 PM, Alex Deucher wrote:
> On Thu, Apr 5, 2018 at 2:26 PM, Andrey Grodzovsky
> <andrey.grodzovsky at amd.com> wrote:
>> From: Alex Deucher <alexander.deucher at amd.com>
>>
>> The vbios uses memory from the start of vram for the pre-OS
>> framebuffer. Reserve this at driver load time to prevent
>> the driver from using it for other things which may cause
>> atrifacts on screen before the console has kicked in.
>>
>> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
>> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>

[...]

>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
>> index d71d4cb..c8c5ca2 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
>> @@ -1096,7 +1096,7 @@ static int gmc_v8_0_sw_init(void *handle)
>>          */
>>         adev->gmc.mc_mask = 0xffffffffffULL; /* 40 bit MC */
>>
>> -       adev->gmc.stolen_size = 256 * 1024;
>> +       adev->gmc.stolen_size = 32 * 1024 * 1024;
> 
> For platforms that might have limited carve out (ST, CZ, RV), we may
> want to do something like:
> if (adev->gmc.real_vram_size <= 32MB) // 128MB?
>     stolen_size = 256K;

That means artifacts are likely to still occur during initialization on
systems where we only reserve 256K, right?


I wonder if there's no way to determine which part of VRAM is being
scanned out. If there was, we could just create a normal BO covering
that, which would get destroyed once no CRTC references it anymore.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux