diff --git a/Makefile.umbrella.tmk b/Makefile.umbrella.tmk index a19dea61c..a63cc4e40 100644 --- a/Makefile.umbrella.tmk +++ b/Makefile.umbrella.tmk @@ -71,7 +71,6 @@ NV_REPOSITORY_COMPONENTS += userspace/units/falcon/falcon_tests NV_REPOSITORY_COMPONENTS += userspace/units/pmu NV_REPOSITORY_COMPONENTS += userspace/units/gr NV_REPOSITORY_COMPONENTS += userspace/units/gr/config -NV_REPOSITORY_COMPONENTS += userspace/units/gr/init endif # Local Variables: diff --git a/drivers/gpu/nvgpu/libnvgpu-drv_safe.export b/drivers/gpu/nvgpu/libnvgpu-drv_safe.export index 9b2342b9e..fd6775816 100644 --- a/drivers/gpu/nvgpu/libnvgpu-drv_safe.export +++ b/drivers/gpu/nvgpu/libnvgpu-drv_safe.export @@ -91,8 +91,6 @@ nvgpu_gr_config_get_sm_info_sm_index nvgpu_gr_config_set_gpc_tpc_mask nvgpu_gr_config_get_gpc_tpc_mask nvgpu_can_busy -nvgpu_gr_prepare_sw -nvgpu_gr_enable_hw nvgpu_channel_alloc_inst nvgpu_channel_cleanup_sw nvgpu_channel_close diff --git a/userspace/Makefile.sources b/userspace/Makefile.sources index 2b04e7930..975f2ecec 100644 --- a/userspace/Makefile.sources +++ b/userspace/Makefile.sources @@ -71,12 +71,11 @@ UNITS := \ $(UNIT_SRC)/fifo/tsg \ $(UNIT_SRC)/list \ $(UNIT_SRC)/enabled \ - $(UNIT_SRC)/falcon \ - $(UNIT_SRC)/falcon/falcon_tests \ - $(UNIT_SRC)/pmu \ $(UNIT_SRC)/gr \ $(UNIT_SRC)/gr/config \ - $(UNIT_SRC)/gr/init + $(UNIT_SRC)/falcon \ + $(UNIT_SRC)/falcon/falcon_tests \ + $(UNIT_SRC)/pmu ifeq ($(CONFIG_NVGPU_HAL_NON_FUSA),1) UNITS += $(UNIT_SRC)/fuse diff --git a/userspace/firmware/NETD_img.bin b/userspace/firmware/NETD_img.bin deleted file mode 100755 index f80194cab..000000000 Binary files a/userspace/firmware/NETD_img.bin and /dev/null differ diff --git a/userspace/firmware/fecs.bin b/userspace/firmware/fecs.bin deleted file mode 100644 index 2e3e996bb..000000000 Binary files a/userspace/firmware/fecs.bin and /dev/null differ diff --git a/userspace/firmware/gpccs.bin b/userspace/firmware/gpccs.bin deleted file mode 100644 index 2e3e996bb..000000000 Binary files a/userspace/firmware/gpccs.bin and /dev/null differ diff --git a/userspace/install-unit.sh b/userspace/install-unit.sh index be2a59b8c..6a28b889f 100755 --- a/userspace/install-unit.sh +++ b/userspace/install-unit.sh @@ -103,7 +103,6 @@ fi # Building the necessary directory structure. It may not be present # first time this is run. ssh $target mkdir -p nvgpu_unit/units -ssh $target mkdir -p nvgpu_unit/firmware ssh $target mkdir -p $TOP/kernel if [ $? != 0 ]; then echo @@ -122,7 +121,6 @@ jcp $TOP/kernel/nvgpu/userspace/gcov.sh nvgpu_unit/gcov.sh jcp $TOP/kernel/nvgpu/userspace/testlist.py nvgpu_unit/testlist.py jcp $TOP/kernel/nvgpu/userspace/required_tests.json \ nvgpu_unit/required_tests.json -jcp $TOP/kernel/nvgpu/userspace/firmware/ nvgpu_unit/firmware/ find $nvgpu_bins/userspace/units -name "*.so" -not -path "*unit.so" \ -not -path "*drv.so" -exec ls {} \; | while read unit_so ; do diff --git a/userspace/required_tests.json b/userspace/required_tests.json index 9a24bff92..77750908a 100644 --- a/userspace/required_tests.json +++ b/userspace/required_tests.json @@ -1373,6 +1373,16 @@ "test_level": 0, "unit": "nvgpu-pmu" }, + { + "test": "init_support", + "test_level": 0, + "unit": "nvgpu_gr_config" + }, + { + "test": "config_init", + "test_level": 0, + "unit": "nvgpu_gr_config" + }, { "test": "config_check_init", "test_level": 0, @@ -1388,34 +1398,9 @@ "test_level": 0, "unit": "nvgpu_gr_config" }, - { - "test": "config_init", - "test_level": 0, - "unit": "nvgpu_gr_config" - }, - { - "test": "init_support", - "test_level": 0, - "unit": "nvgpu_gr_config" - }, { "test": "remove_support", "test_level": 0, "unit": "nvgpu_gr_config" - }, - { - "test": "init_prepare", - "test_level": 0, - "unit": "nvgpu_gr_init" - }, - { - "test": "init_support", - "test_level": 0, - "unit": "nvgpu_gr_init" - }, - { - "test": "remove_support", - "test_level": 0, - "unit": "nvgpu_gr_init" } ] diff --git a/userspace/units/gr/init/Makefile b/userspace/units/gr/init/Makefile deleted file mode 100644 index 060c352ea..000000000 --- a/userspace/units/gr/init/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2019, 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"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -.SUFFIXES: - -OBJS = nvgpu-gr-init.o -MODULE = nvgpu-gr-init - -LIB_PATHS += -lnvgpu-gr -include ../../Makefile.units - -lib$(MODULE).so: nvgpu-gr - -nvgpu-gr: - $(MAKE) -C .. - diff --git a/userspace/units/gr/init/Makefile.interface.tmk b/userspace/units/gr/init/Makefile.interface.tmk deleted file mode 100644 index a7a204f46..000000000 --- a/userspace/units/gr/init/Makefile.interface.tmk +++ /dev/null @@ -1,35 +0,0 @@ -################################### tell Emacs this is a -*- makefile-gmake -*- -# -# Copyright (c) 2019, 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"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. -# -# tmake for SW Mobile component makefile -# -############################################################################### - -NVGPU_UNIT_NAME=nvgpu-gr-init - -include $(NV_COMPONENT_DIR)/../../Makefile.units.common.interface.tmk - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 8 -# End: -# vi: set tabstop=8 noexpandtab: diff --git a/userspace/units/gr/init/Makefile.tmk b/userspace/units/gr/init/Makefile.tmk deleted file mode 100644 index 21366ed6d..000000000 --- a/userspace/units/gr/init/Makefile.tmk +++ /dev/null @@ -1,40 +0,0 @@ -################################### tell Emacs this is a -*- makefile-gmake -*- -# -# Copyright (c) 2019, 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"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. -# -# tmake for SW Mobile component makefile -# -############################################################################### - -NVGPU_UNIT_NAME = nvgpu-gr-init -NVGPU_UNIT_SRCS = nvgpu-gr-init.c - -NVGPU_UNIT_INTERFACE_DIRS := \ - $(NV_COMPONENT_DIR)/.. \ - $(NV_SOURCE)/kernel/nvgpu/drivers/gpu/nvgpu - -include $(NV_COMPONENT_DIR)/../../Makefile.units.common.tmk - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 8 -# End: -# vi: set tabstop=8 noexpandtab: diff --git a/userspace/units/gr/init/nvgpu-gr-init.c b/userspace/units/gr/init/nvgpu-gr-init.c deleted file mode 100644 index 358e79906..000000000 --- a/userspace/units/gr/init/nvgpu-gr-init.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2019, 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"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - - -#include - -#include -#include - -#include -#include -#include - -#include "common/gr/gr_priv.h" - -#include "../nvgpu-gr.h" - -struct unit_module_test nvgpu_gr_init_tests[] = { - UNIT_TEST(init_support, test_gr_init_support, NULL, 0), - UNIT_TEST(init_prepare, test_gr_init_prepare, NULL, 0), - UNIT_TEST(remove_support, test_gr_remove_support, NULL, 0), -}; - -UNIT_MODULE(nvgpu_gr_init, nvgpu_gr_init_tests, UNIT_PRIO_NVGPU_TEST); diff --git a/userspace/units/gr/libnvgpu-gr.export b/userspace/units/gr/libnvgpu-gr.export index f11302967..aed6e7b85 100644 --- a/userspace/units/gr/libnvgpu-gr.export +++ b/userspace/units/gr/libnvgpu-gr.export @@ -22,5 +22,4 @@ test_gr_init_support test_gr_remove_support -test_gr_init_prepare diff --git a/userspace/units/gr/nvgpu-gr-gv11b.c b/userspace/units/gr/nvgpu-gr-gv11b.c index 1dd77fe1b..df042b633 100644 --- a/userspace/units/gr/nvgpu-gr-gv11b.c +++ b/userspace/units/gr/nvgpu-gr-gv11b.c @@ -39,7 +39,6 @@ #include "nvgpu-gr-gv11b.h" #include "nvgpu-gr-gv11b-regs.h" -#define NV_PBB_FBHUB_REGSPACE 0x100B00 /* * Mock I/O */ @@ -133,56 +132,6 @@ int test_gr_setup_gv11b_reg_space(struct unit_module *m, struct gk20a *g) goto clean_up_pes_tpc_mask; } - /* - * GPCS_SWDX reg space - * - */ - if (nvgpu_posix_io_add_reg_space(g, - gr_gpcs_swdx_dss_zbc_color_r_r(0), 0xEFF) != 0) { - unit_err(m, "Add gpcs swdx reg space failed!\n"); - goto clean_up_fs_space; - } - - /* - * PRI_GPCS_GCC reg space - * - */ - if (nvgpu_posix_io_add_reg_space(g, - gr_pri_gpcs_gcc_dbg_r(), 0x60) != 0) { - unit_err(m, "Add gpcs swdx reg space failed!\n"); - goto clean_up_swdx_space; - } - - /* - * PRI_GPCS_TPCS reg space - * - */ - if (nvgpu_posix_io_add_reg_space(g, - gr_gpcs_tpcs_pe_vaf_r(), 0x7FF) != 0) { - unit_err(m, "Add gpcs swdx reg space failed!\n"); - goto clean_up_gcc_space; - } - - /* - * PRI_GPCS_PPCS reg space - * - */ - if (nvgpu_posix_io_add_reg_space(g, - gr_gpcs_tpcs_pes_vsc_vpc_r(), 0x1FF) != 0) { - unit_err(m, "Add gpcs swdx reg space failed!\n"); - goto clean_up_gcc_tpcs_space; - } - - /* - * FB partition reg space - * - */ - if (nvgpu_posix_io_add_reg_space(g, - NV_PBB_FBHUB_REGSPACE, 0x1FF) != 0) { - unit_err(m, "Add gpcs swdx reg space failed!\n"); - goto clean_up_gcc_ppcs_space; - } - /* * MC register mc_enable_r() is set during gr_init_prepare_hw hence * add it to reg space @@ -190,25 +139,13 @@ int test_gr_setup_gv11b_reg_space(struct unit_module *m, struct gk20a *g) if (nvgpu_posix_io_add_reg_space(g, mc_enable_r(), 0x4) != 0) { unit_err(m, "Add mc enable reg space failed!\n"); - goto clean_up_fbhub_space; + goto clean_up_priv_ring; } (void)nvgpu_posix_register_io(g, &gr_test_reg_callbacks); return 0; -clean_up_fbhub_space: - nvgpu_posix_io_delete_reg_space(g, NV_PBB_FBHUB_REGSPACE); -clean_up_gcc_ppcs_space: - nvgpu_posix_io_delete_reg_space(g, gr_gpcs_tpcs_pes_vsc_vpc_r()); -clean_up_gcc_tpcs_space: - nvgpu_posix_io_delete_reg_space(g, gr_gpcs_tpcs_pe_vaf_r()); -clean_up_gcc_space: - nvgpu_posix_io_delete_reg_space(g, gr_pri_gpcs_gcc_dbg_r()); -clean_up_swdx_space: - nvgpu_posix_io_delete_reg_space(g, gr_gpcs_swdx_dss_zbc_color_r_r(0)); -clean_up_fs_space: - nvgpu_posix_io_unregister_reg_space(g, &gv11b_gr_fs_reg_space); clean_up_pes_tpc_mask: nvgpu_posix_io_unregister_reg_space(g, &gv11b_gr_pes_tpc_mask_reg_space); clean_up_priv_ring: @@ -227,11 +164,6 @@ clean_up_master: void test_gr_cleanup_gv11b_reg_space(struct unit_module *m, struct gk20a *g) { - nvgpu_posix_io_delete_reg_space(g, NV_PBB_FBHUB_REGSPACE); - nvgpu_posix_io_delete_reg_space(g, gr_gpcs_tpcs_pes_vsc_vpc_r()); - nvgpu_posix_io_delete_reg_space(g, gr_gpcs_tpcs_pe_vaf_r()); - nvgpu_posix_io_delete_reg_space(g, gr_pri_gpcs_gcc_dbg_r()); - nvgpu_posix_io_delete_reg_space(g, gr_gpcs_swdx_dss_zbc_color_r_r(0)); nvgpu_posix_io_unregister_reg_space(g, &gv11b_top_reg_space); nvgpu_posix_io_unregister_reg_space(g, &gv11b_master_reg_space); nvgpu_posix_io_unregister_reg_space(g, &gv11b_fuse_reg_space); diff --git a/userspace/units/gr/nvgpu-gr.c b/userspace/units/gr/nvgpu-gr.c index cdc444d8f..44bc97365 100644 --- a/userspace/units/gr/nvgpu-gr.c +++ b/userspace/units/gr/nvgpu-gr.c @@ -61,31 +61,9 @@ fail: return UNIT_FAIL; } -int test_gr_init_prepare(struct unit_module *m, struct gk20a *g, void *args) -{ - int err; - - err = nvgpu_gr_prepare_sw(g); - if (err) { - goto prep_fail; - } - - err = nvgpu_gr_enable_hw(g); - if (err) { - goto prep_fail; - } - - return UNIT_SUCCESS; - -prep_fail: - return UNIT_FAIL; - -} - int test_gr_remove_support(struct unit_module *m, struct gk20a *g, void *args) { - test_gr_cleanup_gv11b_reg_space(m, g); nvgpu_gr_free(g); return UNIT_SUCCESS; diff --git a/userspace/units/gr/nvgpu-gr.h b/userspace/units/gr/nvgpu-gr.h index 965494a3b..ab14a134f 100644 --- a/userspace/units/gr/nvgpu-gr.h +++ b/userspace/units/gr/nvgpu-gr.h @@ -39,6 +39,5 @@ int test_gr_init_support(struct unit_module *m, struct gk20a *g, void *args); int test_gr_remove_support(struct unit_module *m, struct gk20a *g, void *args); -int test_gr_init_prepare(struct unit_module *m, - struct gk20a *g, void *args); + #endif /* UNIT_NVGPU_GR_H */