Re: [PATCH 05/16] drm/msm/adreno: Coredump on GPU/GMU init failures

Konrad Dybcio
2026-03-24T09:53:19Z

On 3/23/26 9:12 PM, Akhil P Oommen wrote:
> Capture coredump on GPU or GMU errors during initialization to help in
> debugging the issues. To be consistent with the locks while calling
> msm_gpu_crashstate_capture(), call pm_runtime_get(gpu) always with
> msm_gpu->lock.
>
> Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
> ---
> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 1 +
> drivers/gpu/drm/msm/adreno/adreno_device.c | 7 +++++--
> drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 ++
> drivers/gpu/drm/msm/msm_gpu.c | 5 +++--
> drivers/gpu/drm/msm/msm_gpu.h | 2 ++
> 5 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> index 690d3e53e273..6d511dc54e43 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> @@ -1240,6 +1240,7 @@ int a6xx_gmu_resume(struct a6xx_gpu *a6xx_gpu)
> /* On failure, shut down the GMU to leave it in a good state */
> if (ret) {
> disable_irq(gmu->gmu_irq);
> + msm_gpu_crashstate_capture(gpu, NULL, NULL, NULL, NULL);
> a6xx_rpmh_stop(gmu);
> pm_runtime_put(gmu->gxpd);
> pm_runtime_put(gmu->dev);
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
> index 4edfe80c5be7..85b3e1f0e4fa 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
> @@ -105,6 +105,7 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
> */
> pm_runtime_enable(&pdev->dev);
>
> + mutex_lock(&gpu->lock);

guared(mutex)(&gpu->lock) will let you drop the subsequent
jump-to-unlock

Konrad