msm: kgsl: Replace CP_INTERRUPT with EVENT_WRITE interrupt
Ever since the beginning of time we have used CP_INTERRUPT to trigger an interrupt when a command batch is completed. Back in the dark legacy days we used it because it was the only thing that would work with the conditional interrupt. We kept it after the great dispatcher enlightenment of 2013 because if it ain't broke, don't fix it. And then it broke. Actually it didn't really break, but we've always been lucky when using it because CP_INTERRUPT is triggered when the CP reads the opcode so there isn't really any assurance that the command was completed (to be technical - there isn't any assurance that the retired timestamp was written but that is the only way the CPU knows the command was completed). We manage to get by 99.99% of the time because usually there is another command coming right behind us and the dispatcher will always have reason to be run. But in that .01% window there is a chance that we the timestamp will not yet be written in the short time between processing an interrupt and reading the memstore - the dispatcher thinks nothing has retired and it leaves. The good news is that we have a better way - since we don't need conditional interrupts (yay!) we can use the interrupt selector from the EVENT_WRITE command that writes the timestamp. This is good news because that guy *does* wait for the timestamp before firing the interrupt so no more chance of missing things. Change-Id: Ic0dedbadf612763e3e9af32419badf5034f25277 Signed-off-by:Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by:
Divya Ponnusamy <pdivya@codeaurora.org>
Loading
Please register or sign in to comment