Test Application Sequence for Low Power Modes#
Steps to Enter and Exit SC7#
Prerequisite
Flash and boot P3710/P3960 as per SDK documentation.
Start SC7 Suspend
In Tegra shell, execute:
common_if_testapp -enter_sc7
echo 1 > /sys/class/tegra_hv_pm_ctl/tegra_hv_pm_ctl/device/trigger_sys_suspend
Exit from SC7
In AURIX shell, execute:
exitsc7
Component-Specific Limitations#
NvStreams :
Before SC7 entry, ensure the following requirements for the applications using NvStreams framework to stream data between the producer and consumers:
* There are no jobs that were submitted by the NvStreams applications pending in the CPU or engine pipelines.
* The application is not performing any active `NvSciSync` fence waits.
To meet the requirements, perform the following tasks before proceeding to SC7 entry, if the NvStreams pipeline is being initialized:
* Wait for the buffer and synchronization primitives to be allocated and the NvSciBuf
and NvSciSync
objects are registered to the UMDs.
* For the NvSciStream application, wait for pipeline initialization to complete and all the packets are available in the pool block.
When the application is in the streaming phase, ensure that there are no jobs pending in the CPU or UMD engine pipelines by following the SC7 entry guidelines of the respective UMDs and that there are no packets in flight.
CUDA :
Before SC7 entry, ensure the following requirements for the applications:
* Any outstanding GPU tasks (for example, kernel, memcopies, and event waits) are completed using appropriate synchronization APIs, such as `cudaEventSynchronize`, `cudaStreamSynchronize`, and `cudaDeviceSynchronize`.
* Outstanding GPU tasks can also be cross-engine dependencies (for example, between DLA and GPU) that are built using NvSciSync interop. Waiting on unsignaled NvSciSync can lead to infinite waits, so applications should ensure that the signaler of such fences has unblocked all waiters on the GPU.
* Any ongoing CUDA APIs that are synchronous with respect to the host (for example, `cudaMalloc` and `cudaStreamCreate`) are complete.
* Note that timestamps recorded by `cudaEvent` after returning from SC7 state will account for the duration in which the GPU was in a suspended state, so the elapsed time returned by `cudaEventElapsedTime` should be interpreted accordingly.
DLA :
Before the SC7 entry, if the application fails to ensure that there are no outstanding tasks (submitted but not completed), the DLA detects the scenario and fails the SC7 entry.
PVA :
Before SC7 entry,
* The applications must ensure that there are no pending tasks/commands on the PVA engine by waiting for all the previously submitted commands to finish before entering into SC7 by calling `cupva::Fence::wait()`.
* The applications must not submit any new commands to PVA while the DOS is transitioning to SC7 suspend state.
Camera :
The SIPL camera application should only request NVIDIA DriveOS to transition into the SC7 power state outside of the SIPL hardware initialization and SIPL runtime states.
NvDisplay :
For information on the recommendations, see OpenWFD Usage Guidelines in Display.
Graphics :
Before SC7 entry, ensure that any tasks submitted to GPU should not be in pending state. To do so, applications must call vkQueueWaitIdle()
for each VkQueue created.
NvSciIpc :
Before SC7 entry, ensure that there are no outstanding tasks for applications using NvSciIpc. If a peer endpoint process goes down and up because it is not running during SC7 (that is, Trust Agent), applications must call NvSciIpcResetEndpointSafe()
and then establish connection using the NvSciIpcGetEventSafe()
API after SC7 exit.
NvGPU :
Before SC7 entry, ensure that there are no outstanding tasks for applications using NVGPU. There should not be any new request to NVGPU after the suspend callback is issued other than resume callback. Requests can be made after the driver resumes back and sets the process state to resume done.