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) {