diff --git a/drivers/gpu/nvgpu/common/init/nvgpu_init.c b/drivers/gpu/nvgpu/common/init/nvgpu_init.c index c5aba12cf..1a02b5bf1 100644 --- a/drivers/gpu/nvgpu/common/init/nvgpu_init.c +++ b/drivers/gpu/nvgpu/common/init/nvgpu_init.c @@ -1,7 +1,7 @@ /* * GK20A Graphics * - * Copyright (c) 2011-2022, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2023, 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"), @@ -1020,7 +1020,7 @@ int nvgpu_finalize_poweron(struct gk20a *g) #ifndef CONFIG_NVGPU_DGPU #ifdef CONFIG_NVGPU_GSP_STRESS_TEST NVGPU_INIT_TABLE_ENTRY(&nvgpu_gsp_stress_test_sw_init, - NO_FLAG), + NVGPU_SUPPORT_GSP_STEST), #endif #endif }; diff --git a/drivers/gpu/nvgpu/hal/init/hal_ga10b.c b/drivers/gpu/nvgpu/hal/init/hal_ga10b.c index 06cbe475d..84e8b291a 100644 --- a/drivers/gpu/nvgpu/hal/init/hal_ga10b.c +++ b/drivers/gpu/nvgpu/hal/init/hal_ga10b.c @@ -1,7 +1,7 @@ /* * GA10B Tegra HAL interface * - * Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020-2023, 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"), @@ -1963,6 +1963,7 @@ int ga10b_init_hal(struct gk20a *g) * enable gsp scheduler */ nvgpu_set_enabled(g, NVGPU_SUPPORT_GSP_SCHED, true); + nvgpu_set_enabled(g, NVGPU_SUPPORT_GSP_STEST, true); #endif /* diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index af70985ea..e7d984688 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2023, 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"), @@ -221,20 +221,22 @@ struct gk20a; "Set L2 Max Ways Evict Last support"), \ DEFINE_FLAG(NVGPU_CLK_ARB_ENABLED, "CLK_ARB support"), \ DEFINE_FLAG(NVGPU_SUPPORT_VAB_ENABLED, "VAB feature supported"), \ - DEFINE_FLAG(NVGPU_SUPPORT_ROP_IN_GPC, "ROP is part of GPC"), \ + DEFINE_FLAG(NVGPU_SUPPORT_ROP_IN_GPC, "ROP is part of GPC"), \ DEFINE_FLAG(NVGPU_SUPPORT_BUFFER_METADATA, "Buffer metadata support"), \ - DEFINE_FLAG(NVGPU_SUPPORT_NVS, "Domain scheduler support"), \ - DEFINE_FLAG(NVGPU_SUPPORT_TEGRA_RAW, \ - "TEGRA_RAW format support"), \ - DEFINE_FLAG(NVGPU_SUPPORT_EMULATE_MODE, \ - "Emulate mode support"), \ - DEFINE_FLAG(NVGPU_SUPPORT_PES_FS, \ - "PES Floorsweeping"), \ - DEFINE_FLAG(NVGPU_SCHED_EXIT_WAIT_FOR_ERRBAR_SUPPORTED, \ - "Implicit ERRBAR support"), \ - DEFINE_FLAG(NVGPU_SUPPORT_GSP_SCHED, "To enable gsp sheduler"), \ - DEFINE_FLAG(NVGPU_SUPPORT_MULTI_PROCESS_TSG_SHARING, \ - "Multi process TSG sharing support"), \ + DEFINE_FLAG(NVGPU_SUPPORT_NVS, "Domain scheduler support"), \ + DEFINE_FLAG(NVGPU_SUPPORT_TEGRA_RAW, \ + "TEGRA_RAW format support"), \ + DEFINE_FLAG(NVGPU_SUPPORT_EMULATE_MODE, \ + "Emulate mode support"), \ + DEFINE_FLAG(NVGPU_SUPPORT_PES_FS, \ + "PES Floorsweeping"), \ + DEFINE_FLAG(NVGPU_SCHED_EXIT_WAIT_FOR_ERRBAR_SUPPORTED, \ + "Implicit ERRBAR support"), \ + DEFINE_FLAG(NVGPU_SUPPORT_GSP_SCHED, "To enable gsp sheduler"), \ + DEFINE_FLAG(NVGPU_SUPPORT_GSP_STEST, \ + "Support GSP stress test"), \ + DEFINE_FLAG(NVGPU_SUPPORT_MULTI_PROCESS_TSG_SHARING, \ + "Multi process TSG sharing support"), \ DEFINE_FLAG(NVGPU_MAX_ENABLED_BITS, "Marks max number of flags"), /** diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c index 06d7c274f..a9dc5dad9 100644 --- a/drivers/gpu/nvgpu/os/linux/module.c +++ b/drivers/gpu/nvgpu/os/linux/module.c @@ -1,7 +1,7 @@ /* * GK20A Graphics * - * Copyright (c) 2011-2022, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2023, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -1094,7 +1094,9 @@ void gk20a_remove_support(struct gk20a *g) #endif #ifndef CONFIG_NVGPU_DGPU #ifdef CONFIG_NVGPU_GSP_STRESS_TEST - nvgpu_gsp_test_sw_deinit(g); + if (nvgpu_is_enabled(g, NVGPU_SUPPORT_GSP_STEST)) { + nvgpu_gsp_test_sw_deinit(g); + endif #endif #endif