nvidia: keep RC timer alive across runtime suspend - #1298
Open
lars76 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Any user with both an integrated GPU and a discrete NVIDIA GPU is affected.
Technical cause
nvidia_rc_timer_callback()rearms its one-second timer only whenrm_run_rc_callback()returnsNV_OK.While the GPU is runtime-suspended,
rm_run_rc_callback()returnsNV_ERR_GENERICbecauseFULL_GPU_SANITY_CHECK()requires the GPU to be fully powered.The timer is therefore not rearmed. Nothing starts it again when the GPU resumes, so the one-second callback mechanism remains stopped for the lifetime of the driver instance.
This disables periodic callbacks including the RC watchdog, GPU-presence checking, and GSP log polling. Other fallback mechanisms still exist, so the GPU can continue to work without this timer.
Fix
Rearm the timer while
rc_timer_enabledremains set.nv_stop_rc_timer()clears this flag before intentionally stopping the timer, so the change does not restart a deliberately disabled timer.The timer continues to run on the host, but it does not wake a runtime-suspended NVIDIA GPU.