[Mesa-dev] [PATCH] winsys/amdgpu: disable local BOs on Raven

Nicolai Hähnle nhaehnle at gmail.com
Thu Sep 7 06:53:45 UTC 2017


On 07.09.2017 00:33, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> It hangs with a high degree of reproducibility.

Interesting, I haven't actually seen this yet, but let's do it for now.

Acked-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

> ---
>   src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
> index 897b4f0..4e9022f 100644
> --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
> +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
> @@ -404,21 +404,22 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *ws,
>      if (initial_domain & RADEON_DOMAIN_VRAM)
>         request.preferred_heap |= AMDGPU_GEM_DOMAIN_VRAM;
>      if (initial_domain & RADEON_DOMAIN_GTT)
>         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 &&
> -       ws->info.drm_minor >= 20)
> +       ws->info.drm_minor >= 20 &&
> +       ws->info.family != CHIP_RAVEN)
>         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;
>      }
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list