diff --git a/drivers/gpu/nvgpu/libnvgpu-drv_safe.export b/drivers/gpu/nvgpu/libnvgpu-drv_safe.export index a43a75d50..8977e084d 100644 --- a/drivers/gpu/nvgpu/libnvgpu-drv_safe.export +++ b/drivers/gpu/nvgpu/libnvgpu-drv_safe.export @@ -55,6 +55,7 @@ gm20b_mm_get_big_page_sizes gm20b_pbdma_acquire_val gm20b_pbdma_device_fatal_0_intr_descs gm20b_pbdma_format_gpfifo_entry +gm20b_pbdma_get_ctrl_hce_priv_mode_yes gm20b_pbdma_get_fc_subdevice gm20b_pbdma_get_gp_base gm20b_pbdma_get_gp_base_hi diff --git a/userspace/units/fifo/pbdma/gm20b/nvgpu-pbdma-gm20b.c b/userspace/units/fifo/pbdma/gm20b/nvgpu-pbdma-gm20b.c index ff422d8f6..88cd7c08b 100644 --- a/userspace/units/fifo/pbdma/gm20b/nvgpu-pbdma-gm20b.c +++ b/userspace/units/fifo/pbdma/gm20b/nvgpu-pbdma-gm20b.c @@ -481,6 +481,20 @@ done: return ret; } +int test_gm20b_pbdma_get_ctrl_hce_priv_mode_yes(struct unit_module *m, + struct gk20a *g, void *args) +{ + int ret = UNIT_FAIL; + + assert(gm20b_pbdma_get_ctrl_hce_priv_mode_yes() == + pbdma_hce_ctrl_hce_priv_mode_yes_f()); + + ret = UNIT_SUCCESS; +done: + return ret; +} + + int test_gm20b_pbdma_get_userd(struct unit_module *m, struct gk20a *g, void *args) { @@ -531,6 +545,7 @@ struct unit_module_test nvgpu_pbdma_gm20b_tests[] = { UNIT_TEST(pbdma_format_gpfifo_entry, test_gm20b_pbdma_format_gpfifo_entry, NULL, 0), UNIT_TEST(pbdma_get_gp_base, test_gm20b_pbdma_get_gp_base, NULL, 0), UNIT_TEST(pbdma_get_fc_subdevice, test_gm20b_pbdma_get_fc_subdevice, NULL, 0), + UNIT_TEST(pbdma_get_ctrl_hce_priv_mode_yes, test_gm20b_pbdma_get_ctrl_hce_priv_mode_yes, NULL, 0), UNIT_TEST(pbdma_get_userd, test_gm20b_pbdma_get_userd, NULL, 0), UNIT_TEST(remove_support, test_fifo_remove_support, NULL, 0), }; diff --git a/userspace/units/fifo/pbdma/gm20b/nvgpu-pbdma-gm20b.h b/userspace/units/fifo/pbdma/gm20b/nvgpu-pbdma-gm20b.h index 87d266d4e..08dcfae4d 100644 --- a/userspace/units/fifo/pbdma/gm20b/nvgpu-pbdma-gm20b.h +++ b/userspace/units/fifo/pbdma/gm20b/nvgpu-pbdma-gm20b.h @@ -232,6 +232,26 @@ int test_gm20b_pbdma_get_gp_base(struct unit_module *m, int test_gm20b_pbdma_get_fc_subdevice(struct unit_module *m, struct gk20a *g, void *args); +/** + * Test specification for: test_gm20b_pbdma_get_ctrl_hce_priv_mode_yes + * + * Description: Check RAMFC wrappers for instance block init + * + * Test Type: Feature based + * + * Targets: gm20b_pbdma_get_ctrl_hce_priv_mode_yes + * + * Input: test_fifo_init_support() run for this GPU + * + * Steps: + * - Check that value returned by gm20b_pbdma_get_ctrl_hce_priv_mode_yes + * is consistent with H/W manuals. + * + * Output: Returns PASS if all branches gave expected results. FAIL otherwise. + */ +int test_gm20b_pbdma_get_ctrl_hce_priv_mode_yes(struct unit_module *m, + struct gk20a *g, void *args); + /** * Test specification for: test_gm20b_pbdma_get_userd_addr *