OSDN Git Service

msm: kgsl: Relax timestamp comparisons for processing events
authorJordan Crouse <jcrouse@codeaurora.org>
Wed, 11 May 2016 15:37:48 +0000 (09:37 -0600)
committerCarter Cooper <ccooper@codeaurora.org>
Wed, 20 Jul 2016 21:19:34 +0000 (15:19 -0600)
commit75437b98b172befd87c304066272c756613ac604
treefdb0f70b2285a88620494fc24c39b6a86f0be3fd
parent858b8e026414b3cdc554fdd52e2254ec7b16faeb
msm: kgsl: Relax timestamp comparisons for processing events

When processing an event group we check the previously processed
timestamp to avoid going through the loop if we don't need to.
We use timestamp_cmp() to check the timestamp. In situations
where the retired timestamp has advanced by more than 0x80000000
since the last time we checked the timestamp, timestamp_cmp()
will return -1 as it thinks that the new timestamp is older than
the processed timestamp. This can happen with certain tests and
scheduling hiccups.

The event processor can be much less restrictive - all we really
care about is that the retired timestamp didn't slip backwards by
accident (highly unlikely). So just check that the last proccessed
timestamp is not equal to the retired timestamp and if the
retired timestamp has already rolled, that the delta is outside
of the 0x8000000 window.

CRs-Fixed: 1009149
Change-Id: Ic0dedbad641bfa3fd6cbc1c91a37fb0e37f72bae
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
drivers/gpu/msm/kgsl_events.c