mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	drm/amdgpu: skip CG/PG for gfx during S0ix
Not needed as the device is in gfxoff state so the CG/PG state is handled just like it would be for gfxoff during runtime gfxoff. This should also prevent delays on resume. Reworked from Pratik's original patch (Alex) Acked-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
This commit is contained in:
		
							parent
							
								
									9bb735abcb
								
							
						
					
					
						commit
						10cb67eb8a
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -2371,6 +2371,10 @@ static int amdgpu_device_set_cg_state(struct amdgpu_device *adev,
 | 
			
		|||
		i = state == AMD_CG_STATE_GATE ? j : adev->num_ip_blocks - j - 1;
 | 
			
		||||
		if (!adev->ip_blocks[i].status.late_initialized)
 | 
			
		||||
			continue;
 | 
			
		||||
		/* skip CG for GFX on S0ix */
 | 
			
		||||
		if (adev->in_s0ix &&
 | 
			
		||||
		    adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX)
 | 
			
		||||
			continue;
 | 
			
		||||
		/* skip CG for VCE/UVD, it's handled specially */
 | 
			
		||||
		if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
 | 
			
		||||
		    adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE &&
 | 
			
		||||
| 
						 | 
				
			
			@ -2402,6 +2406,10 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power
 | 
			
		|||
		i = state == AMD_PG_STATE_GATE ? j : adev->num_ip_blocks - j - 1;
 | 
			
		||||
		if (!adev->ip_blocks[i].status.late_initialized)
 | 
			
		||||
			continue;
 | 
			
		||||
		/* skip PG for GFX on S0ix */
 | 
			
		||||
		if (adev->in_s0ix &&
 | 
			
		||||
		    adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX)
 | 
			
		||||
			continue;
 | 
			
		||||
		/* skip CG for VCE/UVD, it's handled specially */
 | 
			
		||||
		if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
 | 
			
		||||
		    adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE &&
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue