From 8169bc8c8314d871b445817efad7e0c13ed3c76b Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Tue, 8 Mar 2022 12:39:46 +0000 Subject: [PATCH] Revert "gpu: nvgpu: disable golden context image verification" This reverts commit a372ec9a3813b56bc0fb308f44af38bef47a9b5f. Earlier golden context image verification was failing on orin safety due to mismatch. But on tot there is no mismatch obeserved (possibly due to update of NET image from A to D). So, now golden context image verification can be re-enabled for orin safety. Bug 3482988 Change-Id: I2bda9be921987e6b6a3b933b3ff45b26cf3025ca Signed-off-by: Shashank Singh Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2678153 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/Makefile.shared.configs | 1 + libs/dgpu/libnvgpu-drv-dgpu_safe.export | 1 + libs/igpu/libnvgpu-drv-igpu_safe.export | 1 + userspace/units/gr/setup/nvgpu-gr-setup.c | 5 ++--- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/Makefile.shared.configs b/drivers/gpu/nvgpu/Makefile.shared.configs index 7b7367fbd..c87026dbf 100644 --- a/drivers/gpu/nvgpu/Makefile.shared.configs +++ b/drivers/gpu/nvgpu/Makefile.shared.configs @@ -82,6 +82,7 @@ ifeq ($(profile),$(filter $(profile),safety_debug safety_release)) # Enable golden context verification only for safety debug/release build NVGPU_COMMON_CFLAGS += \ + -DCONFIG_NVGPU_GR_GOLDEN_CTX_VERIFICATION \ -DCONFIG_NVGPU_BUILD_CONFIGURATION_IS_SAFETY ## For tesing of CTXSW FW error codes manually, enable below configs in safety build. diff --git a/libs/dgpu/libnvgpu-drv-dgpu_safe.export b/libs/dgpu/libnvgpu-drv-dgpu_safe.export index eb6cf09ea..645b3df25 100644 --- a/libs/dgpu/libnvgpu-drv-dgpu_safe.export +++ b/libs/dgpu/libnvgpu-drv-dgpu_safe.export @@ -478,6 +478,7 @@ nvgpu_gr_global_ctx_buffer_get_mem nvgpu_gr_global_ctx_buffer_map nvgpu_gr_global_ctx_buffer_ready nvgpu_gr_global_ctx_buffer_unmap +nvgpu_gr_global_ctx_compare_golden_images nvgpu_gr_global_ctx_deinit_local_golden_image nvgpu_gr_global_ctx_desc_alloc nvgpu_gr_global_ctx_desc_free diff --git a/libs/igpu/libnvgpu-drv-igpu_safe.export b/libs/igpu/libnvgpu-drv-igpu_safe.export index 3e98a6599..eba68c9ad 100644 --- a/libs/igpu/libnvgpu-drv-igpu_safe.export +++ b/libs/igpu/libnvgpu-drv-igpu_safe.export @@ -494,6 +494,7 @@ nvgpu_gr_global_ctx_buffer_get_mem nvgpu_gr_global_ctx_buffer_map nvgpu_gr_global_ctx_buffer_ready nvgpu_gr_global_ctx_buffer_unmap +nvgpu_gr_global_ctx_compare_golden_images nvgpu_gr_global_ctx_deinit_local_golden_image nvgpu_gr_global_ctx_desc_alloc nvgpu_gr_global_ctx_desc_free diff --git a/userspace/units/gr/setup/nvgpu-gr-setup.c b/userspace/units/gr/setup/nvgpu-gr-setup.c index 9b860f35c..43f589f7b 100644 --- a/userspace/units/gr/setup/nvgpu-gr-setup.c +++ b/userspace/units/gr/setup/nvgpu-gr-setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -725,13 +725,12 @@ int test_gr_setup_alloc_obj_ctx(struct unit_module *m, if (err != 0) { unit_return_fail(m, "local golden image alloc failed\n"); } -#if 0 err = nvgpu_gr_global_ctx_alloc_local_golden_image(g, &g->gr->golden_image->local_golden_image_copy, 0x800); if (err != 0) { unit_return_fail(m, "local golden image copy alloc failed\n"); } -#endif + /* Test with channel and tsg */ err = gr_test_setup_allocate_ch_tsg(m, g); if (err != 0) {