mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: unit: init dma field to 0
In the C1 test, the "dma" field of the supplied SGLs was not properly initialized to 0 which could cause crashes. JIRA NVGPU-907 Change-Id: I7cf2a4a455251817c64d255813c7495f24d5c6af Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1997936 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
b97a322eda
commit
9953b17ae1
@@ -956,7 +956,7 @@ static struct vm_gk20a *init_test_req_vm(struct gk20a *g)
|
||||
static int test_nvgpu_page_table_c1_full(struct unit_module *m,
|
||||
struct gk20a *g, void *args)
|
||||
{
|
||||
u32 mem_i;
|
||||
u32 mem_i, i;
|
||||
struct nvgpu_mem mem[REQ_C1_NUM_MEMS] = {};
|
||||
struct nvgpu_sgt *mixed_sgt = NULL;
|
||||
u32 nr_sgls = 5;
|
||||
@@ -998,6 +998,9 @@ static int test_nvgpu_page_table_c1_full(struct unit_module *m,
|
||||
mixed_sgl_list[4].length = SZ_64K * 10;
|
||||
mixed_sgl_list[4].phys = mixed_sgl_list[3].phys +
|
||||
mixed_sgl_list[3].length + TEST_HOLE_SIZE;
|
||||
for (i = 0; i < nr_sgls; i++) {
|
||||
mixed_sgl_list[i].dma = 0;
|
||||
}
|
||||
|
||||
mixed_sgt = custom_sgt_create(m, g, &mem[2], mixed_sgl_list,
|
||||
nr_sgls);
|
||||
|
||||
Reference in New Issue
Block a user