mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
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:
committed by
mobile promotions
parent
63057907ee
commit
b2345cd01a
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2018-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"),
|
||||
@@ -32,9 +32,11 @@
|
||||
#define FW_MAX_PATH_SIZE 2048U
|
||||
|
||||
#if defined(__QNX__)
|
||||
#define NVGPU_UNITTEST_UCODE_PATH "/gv11b/"
|
||||
#define NVGPU_UNITTEST_UCODE_PATH_GV11B "/gv11b/"
|
||||
#define NVGPU_UNITTEST_UCODE_PATH_GA10B "/ga10b/"
|
||||
#else
|
||||
#define NVGPU_UNITTEST_UCODE_PATH "/firmware/gv11b/"
|
||||
#define NVGPU_UNITTEST_UCODE_PATH_GV11B "/firmware/gv11b/"
|
||||
#define NVGPU_UNITTEST_UCODE_PATH_GA10B "/firmware/ga10b/"
|
||||
#endif
|
||||
|
||||
static int nvgpu_ucode_load(struct gk20a *g, const char *path,
|
||||
@@ -130,14 +132,24 @@ struct nvgpu_firmware *nvgpu_request_firmware(struct gk20a *g,
|
||||
|
||||
full_path_len = strlen(full_path);
|
||||
full_path_len += strlen(fw_name);
|
||||
full_path_len += strlen(NVGPU_UNITTEST_UCODE_PATH);
|
||||
|
||||
if (strcmp(g->name, "ga10b") == 0) {
|
||||
full_path_len += strlen(NVGPU_UNITTEST_UCODE_PATH_GA10B);
|
||||
} else {
|
||||
full_path_len += strlen(NVGPU_UNITTEST_UCODE_PATH_GV11B);
|
||||
}
|
||||
|
||||
if (full_path_len >= FW_MAX_PATH_SIZE) {
|
||||
nvgpu_err(g, "Invalid MAX_PATH_SIZE %lu %u", full_path_len,
|
||||
FW_MAX_PATH_SIZE);
|
||||
goto err;
|
||||
}
|
||||
|
||||
strcat(full_path, NVGPU_UNITTEST_UCODE_PATH);
|
||||
if (strcmp(g->name, "ga10b") == 0) {
|
||||
strcat(full_path, NVGPU_UNITTEST_UCODE_PATH_GA10B);
|
||||
} else {
|
||||
strcat(full_path, NVGPU_UNITTEST_UCODE_PATH_GV11B);
|
||||
}
|
||||
strcat(full_path, fw_name);
|
||||
|
||||
fw = nvgpu_kzalloc(g, sizeof(*fw));
|
||||
|
||||
Reference in New Issue
Block a user