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>

Conflicts:
	drivers/gpu/msm/kgsl_device.h
msm: kgsl: Add NULL check for next_event hook

KGSL driver needs to check that the function pointer
is not NULL before calling the hook. next_event
is an optional function not implemented by the 2d
core. This fix ensures that optional and unimplemented
function will not invoked by the driver.

Change-Id: I687b028260e3ec304d973c6a5bded0a8fdbfb73b
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>