mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: modify unit tests for non-safety build
Modify unit tests to successfully compile with non-safety build. JIRA NVGPU-5363 Change-Id: Ib869880372972895861db246ff06b5373756e0fe Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2369659 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
8ec1ec4f69
commit
1278204c28
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2020, 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"),
|
||||
@@ -201,7 +201,6 @@ int test_gr_global_ctx_local_ctx_error_injection(struct unit_module *m,
|
||||
struct gk20a *g, void *args)
|
||||
{
|
||||
int err;
|
||||
bool valid;
|
||||
struct nvgpu_mem mem;
|
||||
struct nvgpu_gr_global_ctx_local_golden_image *local_golden_image;
|
||||
struct nvgpu_gr_global_ctx_local_golden_image *local_golden_image_bk;
|
||||
@@ -249,6 +248,8 @@ int test_gr_global_ctx_local_ctx_error_injection(struct unit_module *m,
|
||||
if (local_golden_image_bk == NULL) {
|
||||
unit_return_fail(m, "failed to initialize local golden image");
|
||||
}
|
||||
#ifdef CONFIG_NVGPU_GR_GOLDEN_CTX_VERIFICATION
|
||||
bool valid;
|
||||
|
||||
/* Compare two images, they should match since both have zero's only */
|
||||
valid = nvgpu_gr_global_ctx_compare_golden_images(g, true, local_golden_image,
|
||||
@@ -271,6 +272,7 @@ int test_gr_global_ctx_local_ctx_error_injection(struct unit_module *m,
|
||||
if (valid) {
|
||||
unit_return_fail(m, "unexpected success");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Cleanup */
|
||||
nvgpu_gr_global_ctx_deinit_local_golden_image(g, local_golden_image);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2020, 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"),
|
||||
@@ -298,8 +298,10 @@ int test_gr_obj_ctx_error_injection(struct unit_module *m,
|
||||
|
||||
/* gops.gr.init.load_sw_veid_bundle could be NULL */
|
||||
g->ops.gr.init.load_sw_veid_bundle = NULL;
|
||||
#ifdef CONFIG_NVGPU_GR_GOLDEN_CTX_VERIFICATION
|
||||
/* gops.gr.init.restore_stats_counter_bundle_data could be NULL */
|
||||
g->ops.gr.init.restore_stats_counter_bundle_data = NULL;
|
||||
#endif
|
||||
|
||||
/* Fail 4th gops.gr.init.wait_idle */
|
||||
g->ops.gr.init.wait_idle = test_gr_wait_idle;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "hal/mm/gmmu/gmmu_gv11b.h"
|
||||
#include "hal/mm/mmu_fault/mmu_fault_gv11b.h"
|
||||
#include "hal/fb/fb_gm20b.h"
|
||||
#include "hal/fb/fb_gp10b.h"
|
||||
#include "hal/fb/fb_gv11b.h"
|
||||
#include "hal/fb/fb_mmu_fault_gv11b.h"
|
||||
#include "hal/fb/intr/fb_intr_gv11b.h"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "hal/mm/gmmu/gmmu_gv11b.h"
|
||||
#include "hal/mm/mmu_fault/mmu_fault_gv11b.h"
|
||||
#include "hal/fb/fb_gm20b.h"
|
||||
#include "hal/fb/fb_gp10b.h"
|
||||
#include "hal/fb/fb_gv11b.h"
|
||||
#include "hal/fb/fb_mmu_fault_gv11b.h"
|
||||
#include "hal/fb/intr/fb_intr_gv11b.h"
|
||||
|
||||
Reference in New Issue
Block a user