drm/msm/a5xx: add devcoredump support to the fault handler
Use adreno_fault_handler() to implement a5xx_fault_handler(). This enables devcoredump support on a5xx platforms, allowing one to capture the crashed GPU state at the time of context fault. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/522724/ Link: https://lore.kernel.org/r/20230214123504.3729522-4-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
parent
f62ad0f6f4
commit
780668dfef
|
@ -1096,16 +1096,19 @@ bool a5xx_idle(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
|
|||
static int a5xx_fault_handler(void *arg, unsigned long iova, int flags, void *data)
|
||||
{
|
||||
struct msm_gpu *gpu = arg;
|
||||
pr_warn_ratelimited("*** gpu fault: iova=%08lx, flags=%d (%u,%u,%u,%u)\n",
|
||||
iova, flags,
|
||||
struct adreno_smmu_fault_info *info = data;
|
||||
char block[12] = "unknown";
|
||||
u32 scratch[] = {
|
||||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(4)),
|
||||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(5)),
|
||||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(6)),
|
||||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(7)));
|
||||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(7)),
|
||||
};
|
||||
|
||||
gpu->aspace->mmu->funcs->resume_translation(gpu->aspace->mmu);
|
||||
if (info)
|
||||
snprintf(block, sizeof(block), "%x", info->fsynr1);
|
||||
|
||||
return 0;
|
||||
return adreno_fault_handler(gpu, iova, flags, info, block, scratch);
|
||||
}
|
||||
|
||||
static void a5xx_cp_err_irq(struct msm_gpu *gpu)
|
||||
|
|
Loading…
Reference in New Issue