mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 1/6] firmware: qcom: scm: Add qcom_scm_gpu_init_regs_is_available()
Date: Thu, 19 Nov 2026 00:12:18 +0530	[thread overview]
Message-ID: <4d16306b-31c1-4406-a1f4-858abd3f44ff@oss.qualcomm.com> (raw)
In-Reply-To: <20261118-adreno-scm-fallback-v1-1-e99cdbf3121d@oss.qualcomm.com>



On 11/18/2026 6:38 PM, Puranam V G Tejaswi wrote:
> The Adreno driver asks the secure world to initialize some GPU registers
> through qcom_scm_gpu_init_regs(), and fails to power up the GPU if this
> call fails.
> 
> Not every secure world implements this call. When it is missing, the
> call fails in the same way as a real error, so the driver cannot tell
> the two cases apart.
> 
> Add qcom_scm_gpu_init_regs_is_available(), similar to
> qcom_scm_set_gpu_smmu_aperture_is_available(), so that the driver can
> check whether the secure world supports the call before making it.
> 
> Signed-off-by: Puranam V G Tejaswi <puranam.tejaswi@oss.qualcomm.com>

Reviewed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>

-Akhil> ---
>  drivers/firmware/qcom/qcom_scm.c       | 7 +++++++
>  include/linux/firmware/qcom/qcom_scm.h | 1 +
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
> index 030e4ba90812..f4f34b7dd0b2 100644
> --- a/drivers/firmware/qcom/qcom_scm.c
> +++ b/drivers/firmware/qcom/qcom_scm.c
> @@ -1941,6 +1941,13 @@ int qcom_scm_lmh_dcvsh(u32 payload_fn, u32 payload_reg, u32 payload_val,
>  }
>  EXPORT_SYMBOL_GPL(qcom_scm_lmh_dcvsh);
>  
> +bool qcom_scm_gpu_init_regs_is_available(void)
> +{
> +	return __qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_GPU,
> +					    QCOM_SCM_SVC_GPU_INIT_REGS);
> +}
> +EXPORT_SYMBOL_GPL(qcom_scm_gpu_init_regs_is_available);
> +
>  int qcom_scm_gpu_init_regs(u32 gpu_req)
>  {
>  	struct qcom_scm_desc desc = {
> diff --git a/include/linux/firmware/qcom/qcom_scm.h b/include/linux/firmware/qcom/qcom_scm.h
> index a0a6bc0229c4..c9e88b2904e3 100644
> --- a/include/linux/firmware/qcom/qcom_scm.h
> +++ b/include/linux/firmware/qcom/qcom_scm.h
> @@ -131,6 +131,7 @@ bool qcom_scm_lmh_dcvsh_available(void);
>   */
>  #define QCOM_SCM_GPU_TSENSE_EN_REQ BIT(3)
>  
> +bool qcom_scm_gpu_init_regs_is_available(void);
>  int qcom_scm_gpu_init_regs(u32 gpu_req);
>  
>  int qcom_scm_shm_bridge_create(u64 pfn_and_ns_perm_flags,
> 


  reply	other threads:[~2026-11-18 18:42 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 [this message]
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
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=4d16306b-31c1-4406-a1f4-858abd3f44ff@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®