mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	drm/amdgpu: complete gfxoff allow signal during suspend without delay
change guarantees that gfxoff is allowed before moving further in s2idle sequence to add more reliablity about gfxoff in amdgpu IP's suspend flow Signed-off-by: Harsh Jain <harsh.jain@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
		
							parent
							
								
									3b8164f808
								
							
						
					
					
						commit
						4b31b92b14
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		| 
						 | 
					@ -583,10 +583,14 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable)
 | 
				
			||||||
		if (adev->gfx.gfx_off_req_count == 0 &&
 | 
							if (adev->gfx.gfx_off_req_count == 0 &&
 | 
				
			||||||
		    !adev->gfx.gfx_off_state) {
 | 
							    !adev->gfx.gfx_off_state) {
 | 
				
			||||||
			/* If going to s2idle, no need to wait */
 | 
								/* If going to s2idle, no need to wait */
 | 
				
			||||||
			if (adev->in_s0ix)
 | 
								if (adev->in_s0ix) {
 | 
				
			||||||
				delay = GFX_OFF_NO_DELAY;
 | 
									if (!amdgpu_dpm_set_powergating_by_smu(adev,
 | 
				
			||||||
			schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
 | 
											AMD_IP_BLOCK_TYPE_GFX, true))
 | 
				
			||||||
 | 
										adev->gfx.gfx_off_state = true;
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
 | 
				
			||||||
					      delay);
 | 
										      delay);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		if (adev->gfx.gfx_off_req_count == 0) {
 | 
							if (adev->gfx.gfx_off_req_count == 0) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue