mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: Consume L3 map flag even if L3 not supported
This patch fixes a bug where GPU mappings with the L3 hint would fail. The failure happens because the L3 map flag does not get consumed if L3 allocations are disabled. The fix is to consume the flag. Bug 3717951 Bug 3486025 Change-Id: Ib10ee58cc060318c810f86013de7311f73c25729 Signed-off-by: Martin Radev <mradev@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2750419 Reviewed-by: Sagar Kamble <skamble@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
44b6bfbc1d
commit
cb768ff133
@@ -66,10 +66,11 @@ static int nvgpu_vm_translate_linux_flags(struct gk20a *g, u32 flags, u32 *out_c
|
||||
core_flags |= NVGPU_VM_MAP_UNMAPPED_PTE;
|
||||
consumed_flags |= NVGPU_AS_MAP_BUFFER_FLAGS_UNMAPPED_PTE;
|
||||
}
|
||||
if ((flags & NVGPU_AS_MAP_BUFFER_FLAGS_L3_ALLOC) != 0U &&
|
||||
!nvgpu_is_enabled(g, NVGPU_DISABLE_L3_SUPPORT)) {
|
||||
core_flags |= NVGPU_VM_MAP_L3_ALLOC;
|
||||
if ((flags & NVGPU_AS_MAP_BUFFER_FLAGS_L3_ALLOC) != 0U) {
|
||||
/* Consume the flag even if the core flag cannot be set */
|
||||
consumed_flags |= NVGPU_AS_MAP_BUFFER_FLAGS_L3_ALLOC;
|
||||
if (!nvgpu_is_enabled(g, NVGPU_DISABLE_L3_SUPPORT))
|
||||
core_flags |= NVGPU_VM_MAP_L3_ALLOC;
|
||||
}
|
||||
if ((flags & NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL) != 0U) {
|
||||
core_flags |= NVGPU_VM_MAP_DIRECT_KIND_CTRL;
|
||||
|
||||
Reference in New Issue
Block a user