• Bhawanpreet Lakha's avatar
    drm/amd/display: Handle GPU reset for DC block · cdaae837
    Bhawanpreet Lakha authored
    
    
    [Why]
    Previously we used the s3 codepath for gpu reset. This can lead to issues in
    certain case where we end of waiting for fences which will never come (because
    parts of the hw are off due to gpu reset) and we end up waiting forever causing
    a deadlock.
    
    [How]
    Handle GPU reset separately from normal s3 case. We essentially need to redo
    everything we do in s3, but avoid any drm calls.
    
    For GPU reset case
    
    suspend:
    	-Acquire DC lock
    	-Cache current dc_state
    	-Commit 0 stream/planes to dc (this puts dc into a state where it can be
    	 powered off)
    	-Disable interrupts
    resume
    	-Edit cached state to force full update
    	-Commit cached state from suspend
    	-Build stream and plane updates from the cached state
    	-Commit stream/plane updates
    	-Enable interrupts
    	-Release DC lock
    
    v2:
    -Formatting
    -Release dc_state
    Signed-off-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
    Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Reviewed-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    cdaae837
amdgpu_dm.c 249 KB