mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: add DGPU config for context verification in vidmem
Golden context verification in vidmem is only supported in vidmem, hence add CONFIG_NVGPU_DGPU compile time flag for corresponding code. Jira NVGPU-4373 Change-Id: I206d84ae9b89f1c05e8058b65d47991f79693cdd Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2255769 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vinod Gopalakrishnakurup <vinodg@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
Alex Waterman
parent
d7971e7444
commit
1eaa2f3d35
@@ -341,7 +341,9 @@ bool nvgpu_gr_global_ctx_compare_golden_images(struct gk20a *g,
|
||||
bool is_identical = true;
|
||||
u32 *data1 = local_golden_image1->context;
|
||||
u32 *data2 = local_golden_image2->context;
|
||||
#ifdef CONFIG_NVGPU_DGPU
|
||||
u32 i;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* In case of sysmem, direct mem compare can be used.
|
||||
@@ -352,7 +354,9 @@ bool nvgpu_gr_global_ctx_compare_golden_images(struct gk20a *g,
|
||||
if (nvgpu_memcmp((u8 *)data1, (u8 *)data2, size) != 0) {
|
||||
is_identical = false;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
#ifdef CONFIG_NVGPU_DGPU
|
||||
for( i = 0U; i < nvgpu_safe_cast_u64_to_u32(size/sizeof(u32));
|
||||
i = nvgpu_safe_add_u32(i, 1U)) {
|
||||
if (*(data1 + i) != *(data2 + i)) {
|
||||
@@ -363,7 +367,11 @@ bool nvgpu_gr_global_ctx_compare_golden_images(struct gk20a *g,
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
is_identical = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
nvgpu_log_info(g, "%s result %u", __func__, is_identical);
|
||||
return is_identical;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user