gpu: nvgpu: move local golden context memory allocation to poweorn

- Separate out local golden context memory allocation from
  nvgpu_gr_global_ctx_init_local_golden_image() into a new function
  nvgpu_gr_global_ctx_alloc_local_golden_image().
- Add a new member local_golden_image_copy to struct
  nvgpu_gr_obj_ctx_golden_image to store copy used for context
  verification.
- Allocate local golden context memory from nvgpu_gr_obj_ctx_init()
  which is called during poweron path.
- Remove memory allocation from nvgpu_gr_obj_ctx_save_golden_ctx().
- Disable test test_gr_obj_ctx_error_injection since it needs rework
  to accomodate the new changes.
- Fix below tests to allocate local golden context memory :
  test_gr_global_ctx_local_ctx_error_injection
  test_gr_setup_alloc_obj_ctx

Bug 3307637

Change-Id: I2f760d524881fd328346838ea9ce0234358f8e51
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2633713
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Deepak Nibade
2021-11-29 17:08:06 +05:30
committed by mobile promotions
parent e1d6b8af8d
commit 9f55801a15
11 changed files with 102 additions and 127 deletions

View File

@@ -470,6 +470,7 @@ nvgpu_gr_falcon_remove_support
nvgpu_gr_free
nvgpu_gr_fs_state_init
nvgpu_gr_get_config_ptr
nvgpu_gr_global_ctx_alloc_local_golden_image
nvgpu_gr_global_ctx_buffer_alloc
nvgpu_gr_global_ctx_buffer_free
nvgpu_gr_global_ctx_buffer_get_mem

View File

@@ -486,6 +486,7 @@ nvgpu_gr_falcon_remove_support
nvgpu_gr_free
nvgpu_gr_fs_state_init
nvgpu_gr_get_config_ptr
nvgpu_gr_global_ctx_alloc_local_golden_image
nvgpu_gr_global_ctx_buffer_alloc
nvgpu_gr_global_ctx_buffer_free
nvgpu_gr_global_ctx_buffer_get_mem