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

Commit a31d08be authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Replace the command batch syncpoint list



We have spend an inordinate amount of time trying to get command
batch syncpoints right. For reasons that are not even clear to me
we stuck with the list model long after it had become more of a
burden than a benefit. The different behavior of the sync models
and the dynamic nature of the list as it was destroyed required
a lot of complex reference counting and locking which broke
every time we moved to a new kernel or sync model.

This ends now. Syncpoints for each command batch are finite and
known at create time. We do not need to dynamically allocate
blocks of memory for each event, we do not need to reference
count them or dynamically destroy them either. All we need
to have is a fast way to determine when all the events have
expired so we can submit the command batch. In that spirit:

 - Allocate a single array for all syncpoints for a command batch
   at initialization time.
 - Use a bitmap to keep track of pending events - if the event is
   pending, the bit is set. Once the event is expired or destroyed,
   the bit is cleared. When the entire bitmap goes to zero the
   command batch can be submitted. The atomic bitmap operations
   should be plenty fast for our purposes.
 - Syncpoint memory is freed at command batch destroy time - no more
   reference counting or locking required.

Change-Id: Ic0dedbad5ece033e831132bb6d076ef6a542fe1f
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 58ff0284
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