diff options
author | Jordan Crouse <jcrouse@codeaurora.org> | 2018-07-24 10:33:30 -0600 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-07-30 08:50:06 -0400 |
commit | 50f8d21863b9b774b198e631d2b14878f6a54b5b (patch) | |
tree | cea285532643cb33364c560cba90ecb624cf46d5 /drivers/gpu/drm/msm/adreno/a4xx_gpu.c | |
parent | drm/msm/adreno: Add ringbuffer data to the GPU state (diff) | |
download | linux-dev-50f8d21863b9b774b198e631d2b14878f6a54b5b.tar.xz linux-dev-50f8d21863b9b774b198e631d2b14878f6a54b5b.zip |
drm/msm/adreno: Add a5xx specific registers for the GPU state
HLSQ, SP and TP registers are only accessible from a special
aperture and to make matters worse the aperture is blocked from
the CPU on targets that can support secure rendering. Luckily the
GPU hardware has its own purpose built register dumper that can
access the registers from the aperture. Add a5xx specific code
to program the crashdumper and retrieve the wayward registers
and dump them for the crash state.
Also, remove a block of registers the regular CPU accessible
list that aren't useful for debug which helps reduce the size
of the crash state file by a goodly amount.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/adreno/a4xx_gpu.c')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a4xx_gpu.c b/drivers/gpu/drm/msm/adreno/a4xx_gpu.c index 8129cf037db1..7c4e6dc1ed59 100644 --- a/drivers/gpu/drm/msm/adreno/a4xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a4xx_gpu.c @@ -457,10 +457,12 @@ static const unsigned int a4xx_registers[] = { static struct msm_gpu_state *a4xx_gpu_state_get(struct msm_gpu *gpu) { - struct msm_gpu_state *state = adreno_gpu_state_get(gpu); + struct msm_gpu_state *state = kzalloc(sizeof(*state), GFP_KERNEL); - if (IS_ERR(state)) - return state; + if (!state) + return ERR_PTR(-ENOMEM); + + adreno_gpu_state_get(gpu, state); state->rbbm_status = gpu_read(gpu, REG_A4XX_RBBM_STATUS); |