mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: unit: add tests for TSG hal
Add unit tests for: - gv11b_tsg_init_eng_method_buffers - gv11b_tsg_deinit_eng_method_buffers - gv11b_tsg_bind_channel_eng_method_buffers - gv11b_tsg_unbind_channel_check_eng_faulted Note: gv11b_tsg_enable was already tested as part of TSG common. Added SWUTS documentation for above tests. Modified gv11b_tsg_init_eng_method_buffers to inline computation of method buffer size, as existing static function could never return 0, making one branch not testable. Added dummy IO register spaces for PFB, CE, PBUS and HSUB_COMMON, so that g->ops.mm.init_mm_support can be called as part of test_fifo_init_support. MM support is needed to test allocation and mapping of DMA buffers. Jira NVGPU-3788 Change-Id: I5356531b23c0456662187d16b35955bf0e528782 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2207384 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Seema Khowala <seemaj@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
babdf69f8b
commit
99ffa2622c
@@ -110,7 +110,6 @@ int test_fifo_init_support(struct unit_module *m, struct gk20a *g, void *args)
|
||||
gv11b_init_hal(g);
|
||||
g->ops.fifo.init_fifo_setup_hw = NULL;
|
||||
g->ops.gr.init.get_no_of_sm = stub_gv11b_gr_init_get_no_of_sm;
|
||||
g->ops.tsg.init_eng_method_buffers = NULL;
|
||||
|
||||
global_m = m;
|
||||
|
||||
@@ -122,6 +121,7 @@ int test_fifo_init_support(struct unit_module *m, struct gk20a *g, void *args)
|
||||
*/
|
||||
g->ops.userd.setup_sw = stub_userd_setup_sw;
|
||||
#endif
|
||||
g->ops.mm.init_mm_support(g);
|
||||
|
||||
err = nvgpu_fifo_init_support(g);
|
||||
if (err != 0) {
|
||||
|
||||
Reference in New Issue
Block a user