[PATCH 1/2] drm/amdgpu: increase fragmentation size for Vega10 v2

Felix Kuehling felix.kuehling at amd.com
Thu Aug 3 21:01:01 UTC 2017


On 17-07-19 11:26 AM, Christian König wrote:
> From: Christian König <christian.koenig at amd.com>
>
> The fragment bits work differently for Vega10 compared to previous generations.
>
> Increase the fragment size to 2MB for now to better handle that.
>
> v2: handle the hardware setup as well
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c  | 5 +++--
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c   | 5 +++--
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h   | 4 +++-
>  drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 4 +++-
>  drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c  | 4 +++-
>  5 files changed, 15 insertions(+), 7 deletions(-)
>
>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
> @@ -51,7 +51,9 @@ struct amdgpu_bo_list_entry;
>  #define AMDGPU_VM_PTB_ALIGN_SIZE   32768
>  
>  /* LOG2 number of continuous pages for the fragment field */
> -#define AMDGPU_LOG2_PAGES_PER_FRAG 4
> +#define AMDGPU_LOG2_PAGES_PER_FRAG(adev) \
> +	((adev)->asic_type < CHIP_VEGA10 ? 4 : \
> +	 (adev)->vm_manager.block_size)

With the hardware configuration changed for 256KB BigK TLBs, should this
be changed to 256KB fragments on GFX9 now to get another small TLB boost
for allocations smaller than 2MB?

Regards,
  Felix




More information about the amd-gfx mailing list