<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 10, 2017 at 12:37 PM, Huang Rui <span dir="ltr"><<a href="mailto:ray.huang@amd.com" target="_blank">ray.huang@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">ASIC_INIT_COMPLETE bit must be cleared during S3 resuming phase,<br>
because VBIOS will check the bit to decide if execute ASIC_Init<br>
posting via kernel driver.<br>
<br>
Signed-off-by: Huang Rui <<a href="mailto:ray.huang@amd.com">ray.huang@amd.com</a>><br>
---<br>
drivers/gpu/drm/amd/amdgpu/<wbr>amdgpu_atombios.c | 5 ++++-<br>
drivers/gpu/drm/amd/amdgpu/<wbr>amdgpu_atomfirmware.c | 6 +++++-<br>
2 files changed, 9 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/<wbr>amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/<wbr>amdgpu_atombios.c<br>
index ad43299..b0dd72a8 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/<wbr>amdgpu_atombios.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/<wbr>amdgpu_atombios.c<br>
@@ -1727,8 +1727,11 @@ void amdgpu_atombios_scratch_regs_<wbr>restore(struct amdgpu_device *adev)<br>
{<br>
int i;<br>
<br>
- for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++)<br>
+ for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) {<br>
+ if (i == 7)<br>
+ adev->bios_scratch[i] &= ~ATOM_S7_ASIC_INIT_COMPLETE_<wbr>MASK;<br></blockquote><div><br></div><div>Maybe move this line before the loop?<br></div><div>A comment may also be useful so that somebody doesn't delete the code again in future.<br><br><div><div class="gmail_signature">Gražvydas<br></div></div>
</div><br></div><br></div></div>