drm/amdkfd: AIP mGPUs best prefetch location for xnack on
authorPhilip Yang <Philip.Yang@amd.com>
Sun, 1 Aug 2021 01:28:24 +0000 (21:28 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 Aug 2021 21:19:54 +0000 (17:19 -0400)
commiteff8cbf096a735116cf6fad94d795652d9e0ff41
treef30e5fe31f9b5fdc688ea9332dd50158d8784fcc
parentf5bd523988c8c498ab18a35d729999894e4d2cf5
drm/amdkfd: AIP mGPUs best prefetch location for xnack on

For xnack on, if range ACCESS or ACCESS_IN_PLACE (AIP) by single GPU, or
range is ACCESS_IN_PLACE by mGPUs and all mGPUs connection on XGMI same
hive, the best prefetch location is prefetch_loc GPU. Otherwise, the best
prefetch location is always CPU because GPU does not have coherent
mapping VRAM of other GPUs even with large-BAR PCIe connection.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_svm.c