msm: kgsl: Dump the entire ringbuffer to the snapshot
Dump the entire ringbuffer to the snapshot and let the parser decide
what it wants to show. This is a lot better then trying to make those
sorts of decisions in the kernel. Even if we are dumping the entire
ringbuffer it still only makes sense to dump the IBs for the hanging
frame so do the math to find the context switch before the
last submitted IB and dump only the IBs from there to rptr or the
next context switch whichever is first.
Change-Id: Ic0dedbad3fed6be1fca3ed8a320386f70a562d43
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
diff --git a/drivers/gpu/msm/adreno.h b/drivers/gpu/msm/adreno.h
index b7c3032..07ccb85 100644
--- a/drivers/gpu/msm/adreno.h
+++ b/drivers/gpu/msm/adreno.h
@@ -176,6 +176,12 @@
return (adreno_dev->gpurev >= 300);
}
+static inline int adreno_rb_ctxtswitch(unsigned int *cmd)
+{
+ return (cmd[0] == cp_nop_packet(1) &&
+ cmd[1] == KGSL_CONTEXT_TO_MEM_IDENTIFIER);
+}
+
/**
* adreno_encode_istore_size - encode istore size in CP format
* @adreno_dev - The 3D device.