On 2019-04-26 9:35 a.m., Christian König wrote:
> Am 25.04.19 um 13:37 schrieb Agrawal, Akshu:
>> To avoid evictions, use GTT only for allocation on devices with
>> small vram size.
>>
>> Signed-off-by: Akshu Agrawal <akshu.agra...@amd.com>
>> ---
>>   src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 9 ++++++++-
>>   1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
>> b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
>> index 09cf9247755..aab801b6337 100644
>> --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
>> +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
>> @@ -486,8 +486,15 @@ static struct amdgpu_winsys_bo
>> *amdgpu_create_bo(struct amdgpu_winsys *ws,
>>          * shared with the OS, allow VRAM placements too. The idea is
>> not to use
>>          * VRAM usefully, but to use it so that it's not unused and
>> wasted.
>>          */
>> -      if (!ws->info.has_dedicated_vram)
>> +   if (!ws->info.has_dedicated_vram) {
>> +      /* For devices having small VRAM size use GTT only to
>> +       * avoid evictions.
>> +       */
>> +      if (ws->info.vram_size <= 16777216)
>> +         request.preferred_heap = AMDGPU_GEM_DOMAIN_GTT;
> 
> Well that will certainly cause problems because it would result in
> scanout BOs to be forced into GTT.

The patch is also lacking a rationale, e.g. what problem does it solve?


-- 
Earthling Michel Dänzer               |              https://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to