drm/amdkfd: set attribute access for default ranges

Attribute access value for default ranges is set, based on
process xnack on/off.
XNACK ON has GPU access attribute for unregistered ranges through page
fault. While XNACK OFF has no access attribute for unregistered ranges.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Alex Sierra
2021-04-21 13:54:09 -05:00
committed by Alex Deucher
parent b19dbb7a90
commit 63f1af83ae

View File

@@ -2887,12 +2887,11 @@ svm_range_get_attr(struct kfd_process *p, uint64_t start, uint64_t size,
pr_debug("range attrs not found return default values\n");
svm_range_set_default_attributes(&location, &prefetch_loc,
&granularity, &flags);
/* TODO: Automatically create SVM ranges and map them on
* GPU page faults
if (p->xnack_enabled)
bitmap_fill(bitmap_access, MAX_GPU_INSTANCE);
*/
else
bitmap_zero(bitmap_access, MAX_GPU_INSTANCE);
bitmap_zero(bitmap_aip, MAX_GPU_INSTANCE);
goto fill_values;
}
bitmap_fill(bitmap_access, MAX_GPU_INSTANCE);