mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: falcon: add test for nvgpu_falcon_get_id
Observed during code inspection that unit test to test the function nvgpu_falcon_get_id. JIRA NVGPU-4787 Change-Id: I6824f1297ae655e78acfec42fe66a8b7d46cf103 Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2286523 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
a13a9bdf4c
commit
731e92296b
@@ -390,6 +390,7 @@ nvgpu_engine_status_is_ctxsw_load
|
|||||||
nvgpu_engine_status_is_ctxsw_save
|
nvgpu_engine_status_is_ctxsw_save
|
||||||
nvgpu_engine_status_is_ctxsw_switch
|
nvgpu_engine_status_is_ctxsw_switch
|
||||||
nvgpu_engine_status_is_ctxsw_valid
|
nvgpu_engine_status_is_ctxsw_valid
|
||||||
|
nvgpu_falcon_get_id
|
||||||
nvgpu_falcon_hs_ucode_load_bootstrap
|
nvgpu_falcon_hs_ucode_load_bootstrap
|
||||||
nvgpu_falcon_copy_to_dmem
|
nvgpu_falcon_copy_to_dmem
|
||||||
nvgpu_falcon_copy_to_imem
|
nvgpu_falcon_copy_to_imem
|
||||||
|
|||||||
@@ -563,6 +563,12 @@
|
|||||||
"unit": "falcon",
|
"unit": "falcon",
|
||||||
"test_level": 0
|
"test_level": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"test": "test_falcon_get_id",
|
||||||
|
"case": "falcon_get_id",
|
||||||
|
"unit": "falcon",
|
||||||
|
"test_level": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"test": "test_falcon_halt",
|
"test": "test_falcon_halt",
|
||||||
"case": "falcon_halt",
|
"case": "falcon_halt",
|
||||||
|
|||||||
@@ -414,6 +414,16 @@ int test_falcon_sw_init_free(struct unit_module *m, struct gk20a *g,
|
|||||||
return UNIT_SUCCESS;
|
return UNIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int test_falcon_get_id(struct unit_module *m, struct gk20a *g,
|
||||||
|
void *__args)
|
||||||
|
{
|
||||||
|
if (nvgpu_falcon_get_id(gpccs_flcn) == FALCON_ID_GPCCS) {
|
||||||
|
return UNIT_SUCCESS;
|
||||||
|
} else {
|
||||||
|
return UNIT_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void flcn_mem_scrub_pass(void *data)
|
static void flcn_mem_scrub_pass(void *data)
|
||||||
{
|
{
|
||||||
struct nvgpu_falcon *flcn = (struct nvgpu_falcon *) data;
|
struct nvgpu_falcon *flcn = (struct nvgpu_falcon *) data;
|
||||||
@@ -1383,6 +1393,7 @@ int test_falcon_irq(struct unit_module *m, struct gk20a *g, void *__args)
|
|||||||
|
|
||||||
struct unit_module_test falcon_tests[] = {
|
struct unit_module_test falcon_tests[] = {
|
||||||
UNIT_TEST(falcon_sw_init_free, test_falcon_sw_init_free, NULL, 0),
|
UNIT_TEST(falcon_sw_init_free, test_falcon_sw_init_free, NULL, 0),
|
||||||
|
UNIT_TEST(falcon_get_id, test_falcon_get_id, NULL, 0),
|
||||||
UNIT_TEST(falcon_reset, test_falcon_reset, NULL, 0),
|
UNIT_TEST(falcon_reset, test_falcon_reset, NULL, 0),
|
||||||
UNIT_TEST(falcon_mem_scrub, test_falcon_mem_scrub, NULL, 0),
|
UNIT_TEST(falcon_mem_scrub, test_falcon_mem_scrub, NULL, 0),
|
||||||
UNIT_TEST(falcon_idle, test_falcon_idle, NULL, 0),
|
UNIT_TEST(falcon_idle, test_falcon_idle, NULL, 0),
|
||||||
|
|||||||
@@ -67,6 +67,28 @@ struct unit_module;
|
|||||||
int test_falcon_sw_init_free(struct unit_module *m, struct gk20a *g,
|
int test_falcon_sw_init_free(struct unit_module *m, struct gk20a *g,
|
||||||
void *__args);
|
void *__args);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test specification for: test_falcon_get_id
|
||||||
|
*
|
||||||
|
* Description: The falcon unit shall be able to return the falcon ID
|
||||||
|
* for the falcon.
|
||||||
|
*
|
||||||
|
* Test Type: Feature
|
||||||
|
*
|
||||||
|
* Targets: nvgpu_falcon_get_id
|
||||||
|
*
|
||||||
|
* Input: None.
|
||||||
|
*
|
||||||
|
* Steps:
|
||||||
|
* - Invoke nvgpu_falcon_get_id with the gpccs falcon struct.
|
||||||
|
* - Verify that return falcon ID is #FALCON_ID_GPCCS.
|
||||||
|
*
|
||||||
|
* Output: Returns PASS if the steps above were executed successfully. FAIL
|
||||||
|
* otherwise.
|
||||||
|
*/
|
||||||
|
int test_falcon_get_id(struct unit_module *m, struct gk20a *g,
|
||||||
|
void *__args);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test specification for: test_falcon_reset
|
* Test specification for: test_falcon_reset
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user