Revert "gpu: nvgpu: unit: add gr_prepare tests"

This reverts commit 9bfdb2ba03f90f0cf828f08b99101a3a3e6c4532.

Bug 2693908

Change-Id: I3ef56773e46aad3626f16b84ea5e51c2fdcc3f1c
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2189200
This commit is contained in:
Bo Yan
2019-09-03 09:33:35 -07:00
committed by Alex Waterman
parent d6a4cf11e3
commit df8f8e24b2
16 changed files with 15 additions and 279 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

@@ -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

View File

@@ -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"
}
]

View File

@@ -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 ..

View File

@@ -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:

View File

@@ -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:

View File

@@ -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 <stdlib.h>
#include <unit/unit.h>
#include <unit/io.h>
#include <nvgpu/posix/io.h>
#include <nvgpu/gk20a.h>
#include <nvgpu/gr/gr.h>
#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);

View File

@@ -22,5 +22,4 @@
test_gr_init_support
test_gr_remove_support
test_gr_init_prepare

View File

@@ -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);

View File

@@ -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;

View File

@@ -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 */