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

Commit 7e225c1a authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

msm: kgsl: Fix the ringbuffer wrap around logic



Currently, if read pointer is behind write pointer and there
is not enough space toward the end of the ringbuffer for
new commands, then write pointer is being set to 0.
This is problematic, because it leads to the overwriting of
unexecuted commands with new commands at the start of the
ringbuffer. So, instead of setting the write pointer to 0,
look for space from the start of the ringbuffer up till the
read pointer and if there is room, update the write pointer
accordingly.

CRs-Fixed: 1028465
Change-Id: I1cbdbf139b14988513a22030aa2be4a99a221880
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent 450bd44d
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