linux-stable/drivers/gpu/drm/amd
Felix Kuehling fa5239f2af drm/amdgpu: workaround failed COW checks for Thunk VMAs
KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE.
is_cow_mapping returns true for these mappings, which causes mmap to fail
in ttm_bo_mmap_obj.

As a workaround, clear VM_MAYWRITE for PROT_NONE-COW mappings. This
should prevent the mapping from ever becoming writable and makes
is_cow_mapping(vm_flags) false.

Fixes: f91142c621 ("drm/ttm: nuke VM_MIXEDMAP on BO mappings v3")
Suggested-by: Daniel Vetter <daniel.vetter@intel.com>
Tested-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210715190537.585456-1-Felix.Kuehling@amd.com
Signed-off-by: Christian König <christian.koenig@amd.com>
2021-07-16 09:22:57 +02:00
..
acp
amdgpu drm/amdgpu: workaround failed COW checks for Thunk VMAs 2021-07-16 09:22:57 +02:00
amdkfd drm/amdkfd: Maintain svm_bo reference in page->zone_device_data 2021-07-01 00:05:41 -04:00
display drm/amd/display: Extend DMUB diagnostic logging to DCN3.1 2021-07-01 00:05:40 -04:00
include drm/amdgpu: Update NV SIMD-per-CU to 2 2021-07-01 00:05:18 -04:00
pm drm/amd/pm: skip PrepareMp1ForUnload message in s0ix 2021-07-01 00:05:18 -04:00