drm/amdgpu: move bios scratch reg restore for soc15
Subsystems (2)
PATCH 1/1 drm/amdgpu: move bios scratch reg restore for soc15
It needs to happen after asic_init as asic_init expects the registers to be in the default power up state.
This should fix S3 on vega10.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -6
@@ -2247,9 +2247,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)return r; } } -if (adev->is_atom_fw) -amdgpu_atomfirmware_scratch_regs_restore (adev); -else +if (!adev->is_atom_fw)amdgpu_atombios_scratch_regs_restore (adev);/* post card */
@@ -2259,6 +2257,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)DRM_ERROR ("amdgpu asic init failed\n" ); } +if (adev->is_atom_fw) +amdgpu_atomfirmware_scratch_regs_restore (adev); + r =amdgpu_resume (adev);if (r) {DRM_ERROR ("amdgpu_resume failed (%d).\n" , r);
@@ -2641,12 +2642,12 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)else amdgpu_atombios_scratch_regs_save (adev); r =amdgpu_asic_reset (adev); -if (adev->is_atom_fw) -amdgpu_atomfirmware_scratch_regs_restore (adev); -else +if (!adev->is_atom_fw)amdgpu_atombios_scratch_regs_restore (adev);/* post card */ amdgpu_atom_asic_init (adev->mode_info.atom_context); +if (adev->is_atom_fw) +amdgpu_atomfirmware_scratch_regs_restore (adev);if (!r) {dev_info (adev->dev,"GPU reset succeeded, trying to resume\n" );
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx