msm: kgsl: Add GPU snapshot support
Add support for snapshotting the state of the GPU in a binary format. The
snapshot can be pulled from sysfs and parsed off-target. The advantage is
that far more information can be encapsulated in a snapshot then can be
printed on the console during a hang. Snapshots are automatically created
during a hang, or can be manually triggered by writing 'trigger'
in /sys/class/kgsl/kgsl-<n>/snapshot where n is either the 2D or 3D device.
Snapshot data can be pulled from 'dump' in the same directory.
Change-Id: Ic0dedbad1c8473b3b109582b95a8771b0d341f05
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
diff --git a/drivers/gpu/msm/Makefile b/drivers/gpu/msm/Makefile
index 908b63d..7b8f3e6 100644
--- a/drivers/gpu/msm/Makefile
+++ b/drivers/gpu/msm/Makefile
@@ -8,7 +8,8 @@
kgsl_pwrscale.o \
kgsl_mmu.o \
kgsl_gpummu.o \
- kgsl_iommu.o
+ kgsl_iommu.o \
+ kgsl_snapshot.o
msm_kgsl_core-$(CONFIG_DEBUG_FS) += kgsl_debugfs.o
msm_kgsl_core-$(CONFIG_MSM_KGSL_CFF_DUMP) += kgsl_cffdump.o
@@ -20,8 +21,10 @@
adreno_ringbuffer.o \
adreno_drawctxt.o \
adreno_postmortem.o \
+ adreno_snapshot.o \
adreno_a2xx.o \
adreno_a2xx_trace.o \
+ adreno_a2xx_snapshot.o \
adreno.o
msm_adreno-$(CONFIG_DEBUG_FS) += adreno_debugfs.o