From e677624957d6157055d78f4ed936bfc307f16781 Mon Sep 17 00:00:00 2001 From: nanwa Date: Tue, 25 Mar 2025 06:10:58 +0000 Subject: [PATCH] pva: mirror from gitlab cv/pva-sys-sw Gitlab commit e56dfe9c0b2c3 ("kmd: increase timeouts in nati...") Changes since last deployment: - kmd: increase timeouts in native debug builds - fw: Add support to report invalid cmd index - Honor submission timeout while waiting for space in Fence Buffer - deploy: Make GVS polling more robust - deploy: Update GPL 2 license - deploy: Generate change summary in commit message - Enabling thread safety tests - tests: enable MultipleContexts.MaxContext_SingleThread_SingleProcessOnlyo Change-Id: I8e9353205d322c2a6f3e93875d8b8a8025af4195 Signed-off-by: nanwa Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3326483 Reviewed-by: Mohnish Jain GVS: buildbot_gerritrpt --- drivers/video/tegra/host/pva/Makefile | 9 --------- drivers/video/tegra/host/pva/src/include/pva_api_types.h | 2 +- .../tegra/host/pva/src/kmd/common/pva_kmd_constants.h | 7 +++++++ drivers/video/tegra/host/pva/src/kmd/linux/Kbuild | 9 --------- 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/drivers/video/tegra/host/pva/Makefile b/drivers/video/tegra/host/pva/Makefile index a3f990a2..5a950acc 100644 --- a/drivers/video/tegra/host/pva/Makefile +++ b/drivers/video/tegra/host/pva/Makefile @@ -1,14 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: GPL-2.0-only -# -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. -# -# This program is distributed in the hope it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. ifndef CONFIG_TEGRA_SYSTEM_TYPE_ACK diff --git a/drivers/video/tegra/host/pva/src/include/pva_api_types.h b/drivers/video/tegra/host/pva/src/include/pva_api_types.h index 7df62f89..8d7522d0 100644 --- a/drivers/video/tegra/host/pva/src/include/pva_api_types.h +++ b/drivers/video/tegra/host/pva/src/include/pva_api_types.h @@ -345,7 +345,7 @@ struct pva_cmdbuf_status { uint64_t timestamp; /** Additional status information for the engine state */ uint32_t info32; - /** Additional status information for the engine state */ + /** Index of cmd that resulted in error */ uint16_t info16; /** Error code. Type: enum pva_error */ uint16_t status; diff --git a/drivers/video/tegra/host/pva/src/kmd/common/pva_kmd_constants.h b/drivers/video/tegra/host/pva/src/kmd/common/pva_kmd_constants.h index 651b819f..dd62df31 100644 --- a/drivers/video/tegra/host/pva/src/kmd/common/pva_kmd_constants.h +++ b/drivers/video/tegra/host/pva/src/kmd/common/pva_kmd_constants.h @@ -23,6 +23,13 @@ // clang-format off #if PVA_BUILD_MODE == PVA_BUILD_MODE_SIM #define PVA_KMD_TIMEOUT_FACTOR 100 +#elif (PVA_BUILD_MODE == PVA_BUILD_MODE_NATIVE) && (PVA_IS_DEBUG == 1) + // On native builds, the FW calls the KMD's shared buffer handler in its + // own thread. In debug builds, if there are a large number of messages + // (prints, unregister, etc.), this handler might take a while to execute, + // making the FW and delay the processing of command buffers. This could + // lead to submission timeouts in KMD. + #define PVA_KMD_TIMEOUT_FACTOR 10 #else #define PVA_KMD_TIMEOUT_FACTOR 1 #endif diff --git a/drivers/video/tegra/host/pva/src/kmd/linux/Kbuild b/drivers/video/tegra/host/pva/src/kmd/linux/Kbuild index 453f98fc..3c654582 100644 --- a/drivers/video/tegra/host/pva/src/kmd/linux/Kbuild +++ b/drivers/video/tegra/host/pva/src/kmd/linux/Kbuild @@ -1,14 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: GPL-2.0-only -# -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. -# -# This program is distributed in the hope it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. obj-m := pva_kmd_linux.o