msm: vidc: add sleep of 100us before clock disable
ARM9 execute following sequence when venus is idle 1. Disable ARM9 watchdog 2. Set bit 30 of A_VENUS_CPU_CS_SCIACMDARG0 register to indicate venus is idle 3. Write HFI_MSG_SYS_IDLE to message queue 4. Raise interrupt to host 5. ARM9 execute wait for interrupt instruction to go into low power state. This will internally drain the ARM9 write buffer which can generate bus transaction. 6. ARM9 in idle Host clock gate venus based on following sequence 1. Host receive HFI_MSG_SYS_IDLE from the msg queue 2. Host check both cmd / msg queue are empty by comparing the queue read/write pointers. 3. Host check bit 30 of A_VENUS_CPU_CS_SCIACMDARG0 register to confirm it indicate idle 4. Host clock gate whole venus As the host clock gate venus in step 4, ARM9 is still in step 5&6. The sleep will ensure that step 5 and 6 are completed before host clock gates venus. CRs-Fixed: 589417 CRs-Fixed: 595251 Change-Id: Idf1f788718adea2dacceca97afa4ba4fe4562ddd Signed-off-by:Vikash Garodia <vgarodia@codeaurora.org> Signed-off-by:
Arun Menon <avmenon@codeaurora.org>
Loading
Please register or sign in to comment