gpu: nvgpu: unit: set fixed offset flag for VM tests

Set the NVGPU_VM_MAP_FIXED_OFFSET flag when GPU VA is fixed.

JIRA NVGPU-3631

Change-Id: I8b0cc79e19367e2c729bc7d0744fd08d7c81e6c2
Signed-off-by: Adeel Raza <araza@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2135433
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Adeel Raza
2019-06-12 17:47:31 -07:00
committed by mobile promotions
parent f09d19d5a3
commit d8b2e22de9

View File

@@ -172,6 +172,7 @@ static int map_buffer(struct unit_module *m,
size_t alignment)
{
int ret = UNIT_SUCCESS;
u32 flags = NVGPU_VM_MAP_CACHEABLE;
struct nvgpu_mapped_buf *mapped_buf = NULL;
struct nvgpu_mapped_buf *mapped_buf_check = NULL;
struct nvgpu_os_buffer os_buf = {0};
@@ -232,6 +233,8 @@ static int map_buffer(struct unit_module *m,
ret = UNIT_FAIL;
goto free_vm_area;
}
flags |= NVGPU_VM_MAP_FIXED_OFFSET;
}
#ifdef CONFIG_NVGPU_COMPRESSION
@@ -247,7 +250,7 @@ static int map_buffer(struct unit_module *m,
buf_size,
0,
gk20a_mem_flag_none,
NVGPU_VM_MAP_CACHEABLE,
flags,
compr_kind,
0,
batch,