[Mesa-dev] [PATCH] winsys/amdgpu: disable local BOs again due to worse performance

Christian König ckoenig.leichtzumerken at gmail.com
Tue Dec 12 08:25:16 UTC 2017


Am 11.12.2017 um 18:52 schrieb Nicolai Hähnle:
> On 11.12.2017 16:31, Marek Olšák wrote:
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> Cc: 17.3 <mesa-stable at lists.freedesktop.org>
>
> Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

I would prefer something where we could enable it through an environment 
variable for testing.

But either way is fine with me. Patch is Acked-by: Christian König 
<christian.koenig at amd.com>.

Christian.

>
>
>> ---
>>   src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c 
>> b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
>> index 0d82402..4b12735 100644
>> --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
>> +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
>> @@ -411,23 +411,24 @@ static struct amdgpu_winsys_bo 
>> *amdgpu_create_bo(struct amdgpu_winsys *ws,
>>       * DRM 3.6.0 has good BO move throttling, so we can allow VRAM-only
>>       * placements even with a low amount of stolen VRAM.
>>       */
>>      if (!ws->info.has_dedicated_vram && ws->info.drm_minor < 6)
>>         request.preferred_heap |= AMDGPU_GEM_DOMAIN_GTT;
>>        if (flags & RADEON_FLAG_NO_CPU_ACCESS)
>>         request.flags |= AMDGPU_GEM_CREATE_NO_CPU_ACCESS;
>>      if (flags & RADEON_FLAG_GTT_WC)
>>         request.flags |= AMDGPU_GEM_CREATE_CPU_GTT_USWC;
>> -   if (flags & RADEON_FLAG_NO_INTERPROCESS_SHARING &&
>> +   /* TODO: Enable this once the kernel handles it efficiently. */
>> +   /*if (flags & RADEON_FLAG_NO_INTERPROCESS_SHARING &&
>>          ws->info.drm_minor >= 20)
>> -      request.flags |= AMDGPU_GEM_CREATE_VM_ALWAYS_VALID;
>> +      request.flags |= AMDGPU_GEM_CREATE_VM_ALWAYS_VALID;*/
>>        r = amdgpu_bo_alloc(ws->dev, &request, &buf_handle);
>>      if (r) {
>>         fprintf(stderr, "amdgpu: Failed to allocate a buffer:\n");
>>         fprintf(stderr, "amdgpu:    size      : %"PRIu64" bytes\n", 
>> size);
>>         fprintf(stderr, "amdgpu:    alignment : %u bytes\n", alignment);
>>         fprintf(stderr, "amdgpu:    domains   : %u\n", initial_domain);
>>         goto error_bo_alloc;
>>      }
>>
>
>



More information about the mesa-dev mailing list