gpu: nvgpu: fixing unit tests for ga10b

- Add support for unit tests to run on orin platform.

JIRA NVGPU-9909 

Change-Id: If4ca69b77d0d8483c0e9f6a6a5a64c3c3e050d65
Signed-off-by: srajum <srajum@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2737876
Reviewed-by: Dinesh T <dt@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
srajum
2022-06-30 19:23:04 +05:30
committed by mobile promotions
parent 63057907ee
commit b2345cd01a
9 changed files with 94 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2019-2023, 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"),
@@ -42,6 +42,8 @@
#define NV_PMC_BOOT_0_ARCHITECTURE_GV110 (0x00000015 << \
NVGPU_GPU_ARCHITECTURE_SHIFT)
#define NV_PMC_BOOT_0_ARCHITECTURE_GA100 (0x00000017 << \
NVGPU_GPU_ARCHITECTURE_SHIFT)
#define NV_PMC_BOOT_0_IMPLEMENTATION_B 0xB
/*
@@ -100,9 +102,13 @@ int test_netlist_init_support(struct unit_module *m,
(void)nvgpu_posix_register_io(g, &netlist_test_reg_callbacks);
/*
* HAL init parameters for gv11b
* HAL init parameters for gv11b and ga10b
*/
g->params.gpu_arch = NV_PMC_BOOT_0_ARCHITECTURE_GV110;
if (strcmp(g->name, "ga10b") == 0) {
g->params.gpu_arch = NV_PMC_BOOT_0_ARCHITECTURE_GA100;
} else {
g->params.gpu_arch = NV_PMC_BOOT_0_ARCHITECTURE_GV110;
}
g->params.gpu_impl = NV_PMC_BOOT_0_IMPLEMENTATION_B;
/*