Re: [PATCH 2/6] drm/msm/a6xx: Don't fail GMU resume if the GPU init regs SCM call is absent

From: Akhil P Oommen

Date: Wed Nov 18 2026 - 13:44:53 EST




On 11/18/2026 6:38 PM, Puranam V G Tejaswi wrote:
> On A750, A753 and A8xx, a6xx_gmu_secure_init() asks the secure world to
> program CX_MISC_SW_FUSE_VALUE through qcom_scm_gpu_init_regs(), and
> aborts the GMU resume if that call fails.
>
> Some platforms have a secure world that does not implement this call.
> The call fails every time and the GPU never powers up. The fuse
> register is still protected from the kernel, so the driver cannot
> program it directly either.
>
> If the secure world does not support the call, skip it, but still read
> the fuse register back. An earlier boot stage may have programmed it,
> and the features it enables, such as raytracing, are then reported
> correctly. If nothing programmed it, they stay disabled. Log once when
> the call is skipped.
>
> Signed-off-by: Puranam V G Tejaswi <puranam.tejaswi@xxxxxxxxxxxxxxxx>

Maybe shorten the subject a bit. Say "Make gpu reg init SCM call optional".

Either way:

Reviewed-by: Akhil P Oommen <akhilpo@xxxxxxxxxxxxxxxx>

-Akhil.
> ---
> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 27 ++++++++++++++++++---------
> 1 file changed, 18 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> index 0fa2d2091f3e..95636dabee38 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> @@ -1249,22 +1249,31 @@ static int a6xx_gmu_secure_init(struct a6xx_gpu *a6xx_gpu)
> goto done;
> }
>
> - u32 gpu_req = QCOM_SCM_GPU_ALWAYS_EN_REQ | QCOM_SCM_GPU_TSENSE_EN_REQ;
> + /*
> + * Some secure world implementations do not provide this call.
> + * Skip it then. An earlier boot stage may still have
> + * programmed the fuse register, so read it back either way.
> + */
> + if (qcom_scm_gpu_init_regs_is_available()) {
> + u32 gpu_req = QCOM_SCM_GPU_ALWAYS_EN_REQ |
> + QCOM_SCM_GPU_TSENSE_EN_REQ;
>
> - if (adreno_gpu->info->a6xx->clx_tbl)
> - gpu_req |= QCOM_SCM_GPU_CLX_EN_REQ;
> + if (adreno_gpu->info->a6xx->clx_tbl)
> + gpu_req |= QCOM_SCM_GPU_CLX_EN_REQ;
>
> - ret = qcom_scm_gpu_init_regs(gpu_req);
> - if (ret) {
> - dev_warn_once(gpu->dev->dev,
> - "SCM call failed\n");
> - return ret;
> + ret = qcom_scm_gpu_init_regs(gpu_req);
> + if (ret) {
> + dev_warn_once(gpu->dev->dev, "SCM call failed\n");
> + return ret;
> + }
> + } else {
> + dev_info_once(gpu->dev->dev, "GPU init regs SCM call not available, skipping\n");
> }
>
> /*
> * On A7XX_GEN3 and newer, raytracing may be disabled by the
> * firmware, find out whether that's the case. The scm call
> - * above sets the fuse register.
> + * above, or an earlier boot stage, sets the fuse register.
> */
> fuse_val = a6xx_cx_misc_read(a6xx_gpu,
> REG_A7XX_CX_MISC_SW_FUSE_VALUE);
>