mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-02-21 07:23:58 +00:00
515.43.04
This commit is contained in:
40
src/nvidia/inc/kernel/gpu/perf/kern_cuda_limit.h
Normal file
40
src/nvidia/inc/kernel/gpu/perf/kern_cuda_limit.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef KERNEL_CUDA_LIMIT_H
|
||||
#define KERNEL_CUDA_LIMIT_H
|
||||
|
||||
/* ------------------------ Includes --------------------------------------- */
|
||||
#include "gpu/device/device.h"
|
||||
|
||||
/* ------------------------ Macros ----------------------------------------- */
|
||||
|
||||
|
||||
/* ------------------------ Datatypes -------------------------------------- */
|
||||
|
||||
/* -------------------- Function Prototypes -------------------------------- */
|
||||
|
||||
// Device CLI interfaces
|
||||
NV_STATUS deviceKPerfCudaLimitCliDisable (Device *pDevice, OBJGPU *pGpu);
|
||||
|
||||
#endif // KERNEL_CUDA_LIMIT_H
|
||||
3
src/nvidia/inc/kernel/gpu/perf/kern_perf.h
Normal file
3
src/nvidia/inc/kernel/gpu/perf/kern_perf.h
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
#include "g_kern_perf_nvoc.h"
|
||||
|
||||
71
src/nvidia/inc/kernel/gpu/perf/kern_perf_1hz.h
Normal file
71
src/nvidia/inc/kernel/gpu/perf/kern_perf_1hz.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef KERNEL_PERF_1HZ_H
|
||||
#define KERNEL_PERF_1HZ_H
|
||||
|
||||
/* ------------------------ Includes --------------------------------------- */
|
||||
#include "gpu/gpu_resource.h"
|
||||
#include "objtmr.h"
|
||||
|
||||
/* ------------------------ Macros ----------------------------------------- */
|
||||
/* ------------------------ Datatypes -------------------------------------- */
|
||||
/*!
|
||||
* This structure represents data for managing 1HZ Callback timer
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*!
|
||||
* NV_TRUE if 1Hz callback is in progress
|
||||
*/
|
||||
NvBool b1HzTimerCallback;
|
||||
|
||||
/*!
|
||||
* TRUE if AllowMaxPerf and not in Hibernate/Standby
|
||||
*/
|
||||
NvBool bEnableTimerUpdates;
|
||||
} KERNEL_PERF_1HZ;
|
||||
|
||||
/* -------------------- Function Prototypes -------------------------------- */
|
||||
/*!
|
||||
* @brief Handle 1Hz timer callback from SW interrupts
|
||||
*
|
||||
* @param[in] pGpu OBJGPU pointer
|
||||
* @param[in] pTmr OBJTMR pointer
|
||||
* @param[in] *ptr timer callback ID
|
||||
*
|
||||
* @returns Always return NV_OK
|
||||
*
|
||||
*/
|
||||
NV_STATUS kperfTimerProc(OBJGPU *pGpu, OBJTMR *pTmr, void *ptr);
|
||||
|
||||
/*!
|
||||
* Since the function tmrCancelCallback() needs a distinct value for POBJECT,
|
||||
* we can not just use any value in the POBJECT field if we intend to use
|
||||
* tmrCancelCallback() function. For scheduling Kernel Perf related callbacks we
|
||||
* will use the unique value for the Kernel Perf by using the address of the function
|
||||
* that will be called when timer elapses.
|
||||
*/
|
||||
#define TMR_POBJECT_KERNEL_PERF_1HZ ((void *)(kperfTimerProc))
|
||||
|
||||
#endif // KERNEL_PERF_1HZ_H
|
||||
93
src/nvidia/inc/kernel/gpu/perf/kern_perf_boost.h
Normal file
93
src/nvidia/inc/kernel/gpu/perf/kern_perf_boost.h
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef KERNEL_PERF_BOOST_H
|
||||
#define KERNEL_PERF_BOOST_H
|
||||
|
||||
/* ------------------------ Includes --------------------------------------- */
|
||||
#include "gpu/gpu_resource.h"
|
||||
#include "objtmr.h"
|
||||
|
||||
/* ------------------------ Macros ----------------------------------------- */
|
||||
/*!
|
||||
* Maximum number of boost instances
|
||||
*/
|
||||
#define KERNEL_PERF_BOOST_HINT_COUNT 512
|
||||
|
||||
/*!
|
||||
* Index in the boost array reserved for all CUDA clients
|
||||
*/
|
||||
#define KERNEL_PERF_BOOST_HINT_CUDA_CLIENT_INDEX (0x00000000)
|
||||
|
||||
/* ------------------------ Datatypes -------------------------------------- */
|
||||
/*!
|
||||
* Structure that represents one request for the Boost Hint from a specific
|
||||
* client.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*!
|
||||
* Specifices the handle of the client who requested this boost
|
||||
*/
|
||||
NvHandle hClient;
|
||||
|
||||
/*!
|
||||
* Specifies the duration of the boost in seconds. This has to be less
|
||||
* than NV2080_CTRL_KERNEL_PERF_BOOST_DURATION_MAX.
|
||||
*/
|
||||
NvU32 duration;
|
||||
|
||||
/*!
|
||||
* Specifies the actual command. _CLEAR is to clear existing boost.
|
||||
* _BOOST_1LEVEL is to boost P-State one level higher. _BOOST_TO_MAX is to boost
|
||||
* to the highest P-State.
|
||||
*
|
||||
* Note: _BOOST_1LEVEL is deprecated.
|
||||
*/
|
||||
NvU32 flags;
|
||||
|
||||
/*!
|
||||
* Specifies number of clients who requested
|
||||
* CUDA boost. This is used only in case of the CUDA clients.
|
||||
*/
|
||||
NvU32 refCount;
|
||||
|
||||
/*!
|
||||
* NV_TRUE if the boost duration is infinite, NV_FALSE otherwise.
|
||||
*/
|
||||
NvBool bIsInfinite;
|
||||
} KERNEL_PERF_BOOST_HINT;
|
||||
|
||||
/*!
|
||||
* Structure that represents array of Boosts
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*!
|
||||
* One entry of this array corresponds one boost request
|
||||
*/
|
||||
KERNEL_PERF_BOOST_HINT boostHints[KERNEL_PERF_BOOST_HINT_COUNT];
|
||||
} KERNEL_PERF_BOOST_HINTS;
|
||||
|
||||
/* -------------------- Function Prototypes -------------------------------- */
|
||||
#endif // KERNEL_PERF_BOOST_H
|
||||
84
src/nvidia/inc/kernel/gpu/perf/kern_perf_gpuboostsync.h
Normal file
84
src/nvidia/inc/kernel/gpu/perf/kern_perf_gpuboostsync.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef KERNEL_PERF_GPU_BOOST_SYNC_H
|
||||
#define KERNEL_PERF_GPU_BOOST_SYNC_H
|
||||
|
||||
/* ------------------------ Includes --------------------------------------- */
|
||||
#include "power/gpu_boost_mgr.h"
|
||||
#include "ctrl/ctrl2080/ctrl2080internal.h"
|
||||
|
||||
/* ------------------------ Macros ----------------------------------------- */
|
||||
/* ------------------------ Datatypes -------------------------------------- */
|
||||
/*
|
||||
* GPU Boost synchronization info
|
||||
*/
|
||||
struct KERNEL_PERF_GPU_BOOST_SYNC
|
||||
{
|
||||
/*!
|
||||
* Cached GPU Boost synchronization limits.
|
||||
*/
|
||||
NvU32 limits[NV2080_CTRL_INTERNAL_PERF_SYNC_GPU_BOOST_LIMITS_NUM];
|
||||
|
||||
/*!
|
||||
* Hysteresis value for GPU Boost synchronization hysteresis algorithm.
|
||||
*/
|
||||
NvU64 hysteresisus;
|
||||
|
||||
/*!
|
||||
* Hysteresis algorithm for SLI GPU Boost synchronization enabled
|
||||
*/
|
||||
NvBool bHystersisEnable;
|
||||
|
||||
/*!
|
||||
* SLI GPU Boost feature is enabled.
|
||||
*/
|
||||
NvBool bSliGpuBoostSyncEnable;
|
||||
|
||||
/*!
|
||||
* Bridgeless information, supports only MIO bridge
|
||||
*/
|
||||
NvBool bBridgeless;
|
||||
};
|
||||
|
||||
/*!
|
||||
* SLI GPU Boost synchronization sub-structure.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*!
|
||||
* Timestamp of previous GPU Boost synchronization loop.
|
||||
*/
|
||||
NvU64 prevChangeTsns;
|
||||
|
||||
/*!
|
||||
* Limits of previous GPU Boost synchronization loop.
|
||||
*/
|
||||
NvU32 prevLimits[NV2080_CTRL_INTERNAL_PERF_SYNC_GPU_BOOST_LIMITS_NUM];
|
||||
} SLI_GPU_BOOST_SYNC;
|
||||
|
||||
/* ------------------------ Function Prototypes ---------------------------- */
|
||||
NV_STATUS kperfGpuBoostSyncStateUpdate(OBJGPUBOOSTMGR *pBoostMgr, NvU32 boostGroupId, NvBool bActivate);
|
||||
NV_STATUS kPerfGpuBoostSyncBridgelessUpdateInfo(OBJGPU *pGpu, NvBool bBridgeless);
|
||||
|
||||
#endif // KERNEL_PERF_GPU_BOOST_SYNC_H
|
||||
38
src/nvidia/inc/kernel/gpu/perf/kern_perf_pm.h
Normal file
38
src/nvidia/inc/kernel/gpu/perf/kern_perf_pm.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef KERNEL_PERF_PM_H
|
||||
#define KERNEL_PERF_PM_H
|
||||
|
||||
/* ------------------------ Includes --------------------------------------- */
|
||||
|
||||
/* ------------------------ Macros ----------------------------------------- */
|
||||
|
||||
/* ------------------------ Datatypes -------------------------------------- */
|
||||
|
||||
/* -------------------- Function Prototypes -------------------------------- */
|
||||
|
||||
NV_STATUS kPerfPerfmonClientDeviceSet (NvHandle hClient, NvHandle hDevice, NvBool bReservation, NvBool bClientHandlesGrGating,
|
||||
NvBool bRmHandlesIdleSlow);
|
||||
|
||||
#endif // KERNEL_PERF_PM_H
|
||||
3
src/nvidia/inc/kernel/gpu/perf/kern_perfbuffer.h
Normal file
3
src/nvidia/inc/kernel/gpu/perf/kern_perfbuffer.h
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
#include "g_kern_perfbuffer_nvoc.h"
|
||||
|
||||
Reference in New Issue
Block a user