mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: unit: add gr_prepare tests
Add support gr_prepare for sw and hw. Add needed registers using nvgpu_posix_io_add_reg_space calls. Add unit tests covering following functions nvgpu_gr_prepare_sw nvgpu_gr_enable_hw Copy the falcon ucode binaries under userspace/firmware directory install-unit.sh modified to copy the firmware binaries under nvgpu-unnit/firmware directory Jira NVGPU-3582 Change-Id: If2131d2c48e828251208da86688b0594e62de82e Signed-off-by: vinodg <vinodg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2184293 Reviewed-by: Deepak Nibade <dnibade@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -71,6 +71,7 @@ NV_REPOSITORY_COMPONENTS += userspace/units/falcon/falcon_tests
|
|||||||
NV_REPOSITORY_COMPONENTS += userspace/units/pmu
|
NV_REPOSITORY_COMPONENTS += userspace/units/pmu
|
||||||
NV_REPOSITORY_COMPONENTS += userspace/units/gr
|
NV_REPOSITORY_COMPONENTS += userspace/units/gr
|
||||||
NV_REPOSITORY_COMPONENTS += userspace/units/gr/config
|
NV_REPOSITORY_COMPONENTS += userspace/units/gr/config
|
||||||
|
NV_REPOSITORY_COMPONENTS += userspace/units/gr/init
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ nvgpu_gr_config_get_sm_info_sm_index
|
|||||||
nvgpu_gr_config_set_gpc_tpc_mask
|
nvgpu_gr_config_set_gpc_tpc_mask
|
||||||
nvgpu_gr_config_get_gpc_tpc_mask
|
nvgpu_gr_config_get_gpc_tpc_mask
|
||||||
nvgpu_can_busy
|
nvgpu_can_busy
|
||||||
|
nvgpu_gr_prepare_sw
|
||||||
|
nvgpu_gr_enable_hw
|
||||||
nvgpu_channel_alloc_inst
|
nvgpu_channel_alloc_inst
|
||||||
nvgpu_channel_cleanup_sw
|
nvgpu_channel_cleanup_sw
|
||||||
nvgpu_channel_close
|
nvgpu_channel_close
|
||||||
|
|||||||
@@ -71,11 +71,12 @@ UNITS := \
|
|||||||
$(UNIT_SRC)/fifo/tsg \
|
$(UNIT_SRC)/fifo/tsg \
|
||||||
$(UNIT_SRC)/list \
|
$(UNIT_SRC)/list \
|
||||||
$(UNIT_SRC)/enabled \
|
$(UNIT_SRC)/enabled \
|
||||||
$(UNIT_SRC)/gr \
|
|
||||||
$(UNIT_SRC)/gr/config \
|
|
||||||
$(UNIT_SRC)/falcon \
|
$(UNIT_SRC)/falcon \
|
||||||
$(UNIT_SRC)/falcon/falcon_tests \
|
$(UNIT_SRC)/falcon/falcon_tests \
|
||||||
$(UNIT_SRC)/pmu
|
$(UNIT_SRC)/pmu \
|
||||||
|
$(UNIT_SRC)/gr \
|
||||||
|
$(UNIT_SRC)/gr/config \
|
||||||
|
$(UNIT_SRC)/gr/init
|
||||||
|
|
||||||
ifeq ($(CONFIG_NVGPU_HAL_NON_FUSA),1)
|
ifeq ($(CONFIG_NVGPU_HAL_NON_FUSA),1)
|
||||||
UNITS += $(UNIT_SRC)/fuse
|
UNITS += $(UNIT_SRC)/fuse
|
||||||
|
|||||||
BIN
userspace/firmware/NETD_img.bin
Executable file
BIN
userspace/firmware/NETD_img.bin
Executable file
Binary file not shown.
BIN
userspace/firmware/fecs.bin
Normal file
BIN
userspace/firmware/fecs.bin
Normal file
Binary file not shown.
BIN
userspace/firmware/gpccs.bin
Normal file
BIN
userspace/firmware/gpccs.bin
Normal file
Binary file not shown.
@@ -103,6 +103,7 @@ fi
|
|||||||
# Building the necessary directory structure. It may not be present
|
# Building the necessary directory structure. It may not be present
|
||||||
# first time this is run.
|
# first time this is run.
|
||||||
ssh $target mkdir -p nvgpu_unit/units
|
ssh $target mkdir -p nvgpu_unit/units
|
||||||
|
ssh $target mkdir -p nvgpu_unit/firmware
|
||||||
ssh $target mkdir -p $TOP/kernel
|
ssh $target mkdir -p $TOP/kernel
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo
|
echo
|
||||||
@@ -121,6 +122,7 @@ 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/testlist.py nvgpu_unit/testlist.py
|
||||||
jcp $TOP/kernel/nvgpu/userspace/required_tests.json \
|
jcp $TOP/kernel/nvgpu/userspace/required_tests.json \
|
||||||
nvgpu_unit/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" \
|
find $nvgpu_bins/userspace/units -name "*.so" -not -path "*unit.so" \
|
||||||
-not -path "*drv.so" -exec ls {} \; | while read unit_so ; do
|
-not -path "*drv.so" -exec ls {} \; | while read unit_so ; do
|
||||||
|
|||||||
@@ -1373,16 +1373,6 @@
|
|||||||
"test_level": 0,
|
"test_level": 0,
|
||||||
"unit": "nvgpu-pmu"
|
"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": "config_check_init",
|
||||||
"test_level": 0,
|
"test_level": 0,
|
||||||
@@ -1398,9 +1388,34 @@
|
|||||||
"test_level": 0,
|
"test_level": 0,
|
||||||
"unit": "nvgpu_gr_config"
|
"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": "remove_support",
|
||||||
"test_level": 0,
|
"test_level": 0,
|
||||||
"unit": "nvgpu_gr_config"
|
"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"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
33
userspace/units/gr/init/Makefile
Normal file
33
userspace/units/gr/init/Makefile
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# 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 ..
|
||||||
|
|
||||||
35
userspace/units/gr/init/Makefile.interface.tmk
Normal file
35
userspace/units/gr/init/Makefile.interface.tmk
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
################################### 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:
|
||||||
40
userspace/units/gr/init/Makefile.tmk
Normal file
40
userspace/units/gr/init/Makefile.tmk
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
################################### 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:
|
||||||
43
userspace/units/gr/init/nvgpu-gr-init.c
Normal file
43
userspace/units/gr/init/nvgpu-gr-init.c
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* 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);
|
||||||
@@ -22,4 +22,5 @@
|
|||||||
|
|
||||||
test_gr_init_support
|
test_gr_init_support
|
||||||
test_gr_remove_support
|
test_gr_remove_support
|
||||||
|
test_gr_init_prepare
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
#include "nvgpu-gr-gv11b.h"
|
#include "nvgpu-gr-gv11b.h"
|
||||||
#include "nvgpu-gr-gv11b-regs.h"
|
#include "nvgpu-gr-gv11b-regs.h"
|
||||||
|
|
||||||
|
#define NV_PBB_FBHUB_REGSPACE 0x100B00
|
||||||
/*
|
/*
|
||||||
* Mock I/O
|
* Mock I/O
|
||||||
*/
|
*/
|
||||||
@@ -132,6 +133,56 @@ int test_gr_setup_gv11b_reg_space(struct unit_module *m, struct gk20a *g)
|
|||||||
goto clean_up_pes_tpc_mask;
|
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
|
* MC register mc_enable_r() is set during gr_init_prepare_hw hence
|
||||||
* add it to reg space
|
* add it to reg space
|
||||||
@@ -139,13 +190,25 @@ int test_gr_setup_gv11b_reg_space(struct unit_module *m, struct gk20a *g)
|
|||||||
if (nvgpu_posix_io_add_reg_space(g,
|
if (nvgpu_posix_io_add_reg_space(g,
|
||||||
mc_enable_r(), 0x4) != 0) {
|
mc_enable_r(), 0x4) != 0) {
|
||||||
unit_err(m, "Add mc enable reg space failed!\n");
|
unit_err(m, "Add mc enable reg space failed!\n");
|
||||||
goto clean_up_priv_ring;
|
goto clean_up_fbhub_space;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)nvgpu_posix_register_io(g, &gr_test_reg_callbacks);
|
(void)nvgpu_posix_register_io(g, &gr_test_reg_callbacks);
|
||||||
|
|
||||||
return 0;
|
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:
|
clean_up_pes_tpc_mask:
|
||||||
nvgpu_posix_io_unregister_reg_space(g, &gv11b_gr_pes_tpc_mask_reg_space);
|
nvgpu_posix_io_unregister_reg_space(g, &gv11b_gr_pes_tpc_mask_reg_space);
|
||||||
clean_up_priv_ring:
|
clean_up_priv_ring:
|
||||||
@@ -164,6 +227,11 @@ clean_up_master:
|
|||||||
|
|
||||||
void test_gr_cleanup_gv11b_reg_space(struct unit_module *m, struct gk20a *g)
|
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_top_reg_space);
|
||||||
nvgpu_posix_io_unregister_reg_space(g, &gv11b_master_reg_space);
|
nvgpu_posix_io_unregister_reg_space(g, &gv11b_master_reg_space);
|
||||||
nvgpu_posix_io_unregister_reg_space(g, &gv11b_fuse_reg_space);
|
nvgpu_posix_io_unregister_reg_space(g, &gv11b_fuse_reg_space);
|
||||||
|
|||||||
@@ -61,9 +61,31 @@ fail:
|
|||||||
return UNIT_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,
|
int test_gr_remove_support(struct unit_module *m,
|
||||||
struct gk20a *g, void *args)
|
struct gk20a *g, void *args)
|
||||||
{
|
{
|
||||||
|
test_gr_cleanup_gv11b_reg_space(m, g);
|
||||||
nvgpu_gr_free(g);
|
nvgpu_gr_free(g);
|
||||||
|
|
||||||
return UNIT_SUCCESS;
|
return UNIT_SUCCESS;
|
||||||
|
|||||||
@@ -39,5 +39,6 @@ int test_gr_init_support(struct unit_module *m,
|
|||||||
struct gk20a *g, void *args);
|
struct gk20a *g, void *args);
|
||||||
int test_gr_remove_support(struct unit_module *m,
|
int test_gr_remove_support(struct unit_module *m,
|
||||||
struct gk20a *g, void *args);
|
struct gk20a *g, void *args);
|
||||||
|
int test_gr_init_prepare(struct unit_module *m,
|
||||||
|
struct gk20a *g, void *args);
|
||||||
#endif /* UNIT_NVGPU_GR_H */
|
#endif /* UNIT_NVGPU_GR_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user