Commit 398efc46 authored by Rob Clark's avatar Rob Clark

drm/msm/adreno: move scratch register dumping to per-gen code

Scratch registers move, annoyingly enough, in a5xx.  Move to
per-generation aNxx_recover() fxn.
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent d0651fe8
...@@ -301,8 +301,15 @@ static int a3xx_hw_init(struct msm_gpu *gpu) ...@@ -301,8 +301,15 @@ static int a3xx_hw_init(struct msm_gpu *gpu)
static void a3xx_recover(struct msm_gpu *gpu) static void a3xx_recover(struct msm_gpu *gpu)
{ {
int i;
adreno_dump_info(gpu); adreno_dump_info(gpu);
for (i = 0; i < 8; i++) {
printk("CP_SCRATCH_REG%d: %u\n", i,
gpu_read(gpu, REG_AXXX_CP_SCRATCH_REG0 + i));
}
/* dump registers before resetting gpu, if enabled: */ /* dump registers before resetting gpu, if enabled: */
if (hang_debug) if (hang_debug)
a3xx_dump(gpu); a3xx_dump(gpu);
......
...@@ -299,8 +299,15 @@ static int a4xx_hw_init(struct msm_gpu *gpu) ...@@ -299,8 +299,15 @@ static int a4xx_hw_init(struct msm_gpu *gpu)
static void a4xx_recover(struct msm_gpu *gpu) static void a4xx_recover(struct msm_gpu *gpu)
{ {
int i;
adreno_dump_info(gpu); adreno_dump_info(gpu);
for (i = 0; i < 8; i++) {
printk("CP_SCRATCH_REG%d: %u\n", i,
gpu_read(gpu, REG_AXXX_CP_SCRATCH_REG0 + i));
}
/* dump registers before resetting gpu, if enabled: */ /* dump registers before resetting gpu, if enabled: */
if (hang_debug) if (hang_debug)
a4xx_dump(gpu); a4xx_dump(gpu);
......
...@@ -278,7 +278,6 @@ void adreno_show(struct msm_gpu *gpu, struct seq_file *m) ...@@ -278,7 +278,6 @@ void adreno_show(struct msm_gpu *gpu, struct seq_file *m)
void adreno_dump_info(struct msm_gpu *gpu) 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;
printk("revision: %d (%d.%d.%d.%d)\n", printk("revision: %d (%d.%d.%d.%d)\n",
adreno_gpu->info->revn, adreno_gpu->rev.core, adreno_gpu->info->revn, adreno_gpu->rev.core,
...@@ -290,11 +289,6 @@ void adreno_dump_info(struct msm_gpu *gpu) ...@@ -290,11 +289,6 @@ void adreno_dump_info(struct msm_gpu *gpu)
printk("rptr: %d\n", get_rptr(adreno_gpu)); printk("rptr: %d\n", get_rptr(adreno_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(): */ /* would be nice to not have to duplicate the _show() stuff with printk(): */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment