diff options
| author | Tianci.Yin <tianci.yin@amd.com> | 2020-07-20 15:47:37 +0800 | 
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2020-08-14 16:22:39 -0400 | 
| commit | 425a78f43b34a6bebc5c2746eb09a3b45a45a286 (patch) | |
| tree | 040c47e01a15ab776c35fec95b73782f5ca1b1a9 /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | |
| parent | d58fe3cf11a86e59183c8b91c50ae2cde24a2128 (diff) | |
drm/amdgpu: reconfigure spm golden settings on Navi1x after GFXOFF exit(v3)
On Navi1x, the SPM golden settings are lost after GFXOFF
enter/exit, so reconfigure the golden settings after GFXOFF
exit.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Tianci.Yin <tianci.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index 0cd9de69932b..8ccd17d02cc6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c @@ -560,8 +560,14 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable)  	if (enable && !adev->gfx.gfx_off_state && !adev->gfx.gfx_off_req_count) {  		schedule_delayed_work(&adev->gfx.gfx_off_delay_work, GFX_OFF_DELAY_ENABLE);  	} else if (!enable && adev->gfx.gfx_off_state) { -		if (!amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_GFX, false)) +		if (!amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_GFX, false)) {  			adev->gfx.gfx_off_state = false; + +			if (adev->gfx.funcs->init_spm_golden) { +				dev_dbg(adev->dev, "GFXOFF is disabled, re-init SPM golden settings\n"); +				amdgpu_gfx_init_spm_golden(adev); +			} +		}  	}  	mutex_unlock(&adev->gfx.gfx_off_mutex); | 
