Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1d579a58 authored by Jordan Crouse's avatar Jordan Crouse Committed by Divya Ponnusamy
Browse files

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: default avatarJordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: default avatarDivya Ponnusamy <pdivya@codeaurora.org>
parent 22436311
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment