Skip to content

Commit 886b92f

Browse files
Perry Yuanalexdeucher
authored andcommitted
drm/amdgpu: ungate power gating when system suspend
[Why] During suspend, if GFX DPM is enabled and GFXOFF feature is enabled the system may get hung. So, it is suggested to disable GFXOFF feature during suspend and enable it after resume. [How] Update the code to disable GFXOFF feature during suspend and enable it after resume. [ 311.396526] amdgpu 0000:03:00.0: amdgpu: SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x0000001E SMN_C2PMSG_82:0x00000000 [ 311.396530] amdgpu 0000:03:00.0: amdgpu: Fail to disable dpm features! [ 311.396531] [drm:amdgpu_device_ip_suspend_phase2 [amdgpu]] *ERROR* suspend of IP block <smu> failed -62 Acked-by: Yang Wang <[email protected]> Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Perry Yuan <[email protected]> Signed-off-by: Kun Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 3a50f41 commit 886b92f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3498,6 +3498,8 @@ static void gfx_v10_0_ring_invalidate_tlbs(struct amdgpu_ring *ring,
34983498
static void gfx_v10_0_update_spm_vmid_internal(struct amdgpu_device *adev,
34993499
unsigned int vmid);
35003500

3501+
static int gfx_v10_0_set_powergating_state(void *handle,
3502+
enum amd_powergating_state state);
35013503
static void gfx10_kiq_set_resources(struct amdgpu_ring *kiq_ring, uint64_t queue_mask)
35023504
{
35033505
amdgpu_ring_write(kiq_ring, PACKET3(PACKET3_SET_RESOURCES, 6));
@@ -7179,6 +7181,13 @@ static int gfx_v10_0_hw_fini(void *handle)
71797181
amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0);
71807182
amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0);
71817183

7184+
/* WA added for Vangogh asic fixing the SMU suspend failure
7185+
* It needs to set power gating again during gfxoff control
7186+
* otherwise the gfxoff disallowing will be failed to set.
7187+
*/
7188+
if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(10, 3, 1))
7189+
gfx_v10_0_set_powergating_state(handle, AMD_PG_STATE_UNGATE);
7190+
71827191
if (!adev->no_hw_access) {
71837192
if (amdgpu_async_gfx_ring) {
71847193
if (amdgpu_gfx_disable_kgq(adev, 0))

0 commit comments

Comments
 (0)