[Mesa-dev] [PATCH] radv: Only set the MTYPE flags on GFX9+.
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon Oct 9 08:12:28 UTC 2017
Doesn't it make more sense to check the DRM major/minor versions? In my
opinion, that would be clearer.
On 10/08/2017 09:58 PM, Bas Nieuwenhuizen wrote:
> Older kernels fail the va_op with this flag set. If the kernel
> supports GFX9 usefully, it will also support this flag.
>
> Fixes: e8d57802fea "radv/gfx9: allocate events from uncached VA space"
> ---
> src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
> index d910aae4ba9..bffb76bb331 100644
> --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
> +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
> @@ -345,7 +345,7 @@ radv_amdgpu_winsys_bo_create(struct radeon_winsys *_ws,
>
>
> uint32_t va_flags = 0;
> - if (flags & RADEON_FLAG_VA_UNCACHED)
> + if ((flags & RADEON_FLAG_VA_UNCACHED) && ws->info.chip_class >= GFX9)
> va_flags |= AMDGPU_VM_MTYPE_UC;
> r = radv_amdgpu_bo_va_op(ws->dev, buf_handle, 0, size, va, va_flags, AMDGPU_VA_OP_MAP);
> if (r)
>
More information about the mesa-dev
mailing list