From: Akhil P Oommen <akhilpo@oss.qualcomm.com>
To: Puranam V G Tejaswi <puranam.tejaswi@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Abel Vesa <abelvesa@kernel.org>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Sean Paul <sean@poorly.run>, Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] drm/msm/a6xx: Don't fail GMU resume if the GPU init regs SCM call is absent
Date: Thu, 19 Nov 2026 00:14:34 +0530 [thread overview]
Message-ID: <069c590a-7b30-4985-ab83-56150efc8009@oss.qualcomm.com> (raw)
In-Reply-To: <20261118-adreno-scm-fallback-v1-2-e99cdbf3121d@oss.qualcomm.com>
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@oss.qualcomm.com>
Maybe shorten the subject a bit. Say "Make gpu reg init SCM call optional".
Either way:
Reviewed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
-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);
>
next prev parent reply other threads:[~2026-11-18 18:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 13:08 [PATCH 0/6] drm/msm/adreno: Handle unavailable GPU SCM calls Puranam V G Tejaswi
2026-11-18 13:08 ` [PATCH 1/6] firmware: qcom: scm: Add qcom_scm_gpu_init_regs_is_available() Puranam V G Tejaswi
2026-11-18 18:42 ` Akhil P Oommen
2026-11-18 13:08 ` [PATCH 2/6] drm/msm/a6xx: Don't fail GMU resume if the GPU init regs SCM call is absent Puranam V G Tejaswi
2026-11-18 18:44 ` Akhil P Oommen [this message]
2026-11-18 13:08 ` [PATCH 3/6] dt-bindings: display/msm: gpu: Document the CX SMMU aperture region Puranam V G Tejaswi
2026-11-18 18:45 ` Akhil P Oommen
2026-11-18 13:08 ` [PATCH 4/6] drm/msm/adreno: Program the SMMU aperture when the secure world can't Puranam V G Tejaswi
2026-11-18 18:48 ` Akhil P Oommen
2026-11-18 13:08 ` [PATCH 5/6] arm64: dts: qcom: nord: Describe the GPU CX SMMU aperture Puranam V G Tejaswi
2026-11-18 18:48 ` Akhil P Oommen
2026-11-18 13:08 ` [PATCH 6/6] arm64: dts: qcom: shikra: " Puranam V G Tejaswi
2026-11-18 18:50 ` Akhil P Oommen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=069c590a-7b30-4985-ab83-56150efc8009@oss.qualcomm.com \
--to=akhilpo@oss.qualcomm.com \
--cc=abelvesa@kernel.org \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=puranam.tejaswi@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®