mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: unit: stub userd.setup_sw
libnvgpu-drv can be compiled with NVGPU_USERD, while unit test is not. Make sure we use the stub in any case. Jira NVGPU-3480 Change-Id: Id48d1bda8796dd600f726233978e4f3c4b158674 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2140790 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-by: Alex Waterman <alexw@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
mobile promotions
parent
5035564ffb
commit
06858c83d6
@@ -85,7 +85,6 @@ static u32 stub_gv11b_gr_init_get_no_of_sm(struct gk20a *g)
|
||||
return 8;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NVGPU_USERD
|
||||
static int stub_userd_setup_sw(struct gk20a *g)
|
||||
{
|
||||
struct nvgpu_fifo *f = &g->fifo;
|
||||
@@ -101,7 +100,6 @@ static int stub_userd_setup_sw(struct gk20a *g)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int test_fifo_init_support(struct unit_module *m, struct gk20a *g, void *args)
|
||||
{
|
||||
@@ -117,7 +115,6 @@ int test_fifo_init_support(struct unit_module *m, struct gk20a *g, void *args)
|
||||
g->ops.gr.init.get_no_of_sm = stub_gv11b_gr_init_get_no_of_sm;
|
||||
g->ops.tsg.init_eng_method_buffers = NULL;
|
||||
|
||||
#ifdef CONFIG_NVGPU_USERD
|
||||
global_m = m;
|
||||
/*
|
||||
* Regular USERD init requires bar1.vm to be initialized
|
||||
@@ -125,7 +122,6 @@ int test_fifo_init_support(struct unit_module *m, struct gk20a *g, void *args)
|
||||
* safety build anyway.
|
||||
*/
|
||||
g->ops.userd.setup_sw = stub_userd_setup_sw;
|
||||
#endif
|
||||
|
||||
err = nvgpu_fifo_init_support(g);
|
||||
if (err != 0) {
|
||||
|
||||
Reference in New Issue
Block a user