|
@@ -249,8 +249,13 @@ void adreno_show(struct msm_gpu *gpu, struct seq_file *m)
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-/* would be nice to not have to duplicate the _show() stuff with printk(): */
|
|
|
|
-void adreno_dump(struct msm_gpu *gpu)
|
|
|
|
|
|
+/* Dump common gpu status and scratch registers on any hang, to make
|
|
|
|
+ * the hangcheck logs more useful. The scratch registers seem always
|
|
|
|
+ * safe to read when GPU has hung (unlike some other regs, depending
|
|
|
|
+ * on how the GPU hung), and they are useful to match up to cmdstream
|
|
|
|
+ * dumps when debugging hangs:
|
|
|
|
+ */
|
|
|
|
+void adreno_dump_info(struct msm_gpu *gpu)
|
|
{
|
|
{
|
|
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
|
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
|
int i;
|
|
int i;
|
|
@@ -266,6 +271,18 @@ void adreno_dump(struct msm_gpu *gpu)
|
|
printk("wptr: %d\n", adreno_gpu->memptrs->wptr);
|
|
printk("wptr: %d\n", adreno_gpu->memptrs->wptr);
|
|
printk("rb wptr: %d\n", get_wptr(gpu->rb));
|
|
printk("rb wptr: %d\n", get_wptr(gpu->rb));
|
|
|
|
|
|
|
|
+ for (i = 0; i < 8; i++) {
|
|
|
|
+ printk("CP_SCRATCH_REG%d: %u\n", i,
|
|
|
|
+ gpu_read(gpu, REG_AXXX_CP_SCRATCH_REG0 + i));
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* would be nice to not have to duplicate the _show() stuff with printk(): */
|
|
|
|
+void adreno_dump(struct msm_gpu *gpu)
|
|
|
|
+{
|
|
|
|
+ struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
|
|
|
+ int i;
|
|
|
|
+
|
|
/* dump these out in a form that can be parsed by demsm: */
|
|
/* dump these out in a form that can be parsed by demsm: */
|
|
printk("IO:region %s 00000000 00020000\n", gpu->name);
|
|
printk("IO:region %s 00000000 00020000\n", gpu->name);
|
|
for (i = 0; adreno_gpu->registers[i] != ~0; i += 2) {
|
|
for (i = 0; adreno_gpu->registers[i] != ~0; i += 2) {
|