[PATCH] drm/amdkfd: Only apply TLB flush optimization on ALdebaran

Felix Kuehling felix.kuehling at amd.com
Wed Jun 30 22:44:30 UTC 2021


On 2021-06-30 6:03 p.m., Eric Huang wrote:
> It is based on reverting two patches back.
>    drm/amdkfd: Make TLB flush conditional on mapping
>    drm/amdgpu: Add table_freed parameter to amdgpu_vm_bo_update
>
> Signed-off-by: Eric Huang <jinhuieric.huang at amd.com>

I'd prefer to put HW-specific workarounds in 
amdgpu_amdkfd_gpuvm_map_memory_to_gpu.

Regards,
   Felix


> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> index cfaa5f88e630..f859ee7e8c13 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> @@ -1659,6 +1659,12 @@ static int kfd_ioctl_map_memory_to_gpu(struct file *filep,
>   		goto sync_memory_failed;
>   	}
>   
> +	/* Only apply no TLB flush on Aldebaran to
> +	 * workaround regressions on other Asics
> +	 */
> +	if (dev->device_info->asic_family != CHIP_ALDEBARAN)
> +		table_freed = true;
> +
>   	/* Flush TLBs after waiting for the page table updates to complete */
>   	if (table_freed) {
>   		for (i = 0; i < args->n_devices; i++) {


More information about the amd-gfx mailing list