msm: kgsl: Don't silently ignore events that have a retired timestamp
After all the current events are processed in the main loop, the next
pending event is marked to fire an interrupt to start the cycle anew.
When the event is marked, we check the timestamp again to make sure that
we are always caught up with the GPU. If the timestamp for the next
event happens to be retired when we get to this point, we silently leave
the function.
If there are no other subsequent events or waittimestamp requests, then
it is possible that another interrupt might never be fired for that context
and then the event gets missed. Return a 1 in this case all the way back
up the stack and make the event code keep processing events until we are
positive that none are past.
Change-Id: I5a770e7f06612e1aecbfe2e8ccbfeebdab3fc9fc
CRs-Fixed: 441191
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
diff --git a/drivers/gpu/msm/kgsl_device.h b/drivers/gpu/msm/kgsl_device.h
index a1aae7c..57c3451 100644
--- a/drivers/gpu/msm/kgsl_device.h
+++ b/drivers/gpu/msm/kgsl_device.h
@@ -113,7 +113,7 @@
enum kgsl_property_type type, void *value,
unsigned int sizebytes);
int (*postmortem_dump) (struct kgsl_device *device, int manual);
- void (*next_event)(struct kgsl_device *device,
+ int (*next_event)(struct kgsl_device *device,
struct kgsl_event *event);
};