On Mon, Apr 10, 2017 at 12:37 PM, Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org> wrote:
ASIC_INIT_COMPLETE bit must be cleared during S3 resuming phase,
because VBIOS will check the bit to decide if execute ASIC_Init
posting via kernel driver.

Signed-off-by: Huang Rui <ray.huang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c     | 5 ++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 6 +++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
index ad43299..b0dd72a8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
@@ -1727,8 +1727,11 @@ void amdgpu_atombios_scratch_regs_restore(struct amdgpu_device *adev)
 {
        int i;

-       for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++)
+       for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) {
+               if (i == 7)
+                       adev->bios_scratch[i] &= ~ATOM_S7_ASIC_INIT_COMPLETE_MASK;

Maybe move this line before the loop?
A comment may also be useful so that somebody doesn't delete the code again in future.

Gražvydas