From: Akhil P Oommen <akhilpo@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Sean Paul <sean@poorly.run>,
Konrad Dybcio <konradybcio@kernel.org>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jessica.zhang@oss.qualcomm.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>,
Bjorn Andersson <andersson@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, Jie Zhang <quic_jiezh@quicinc.com>
Subject: Re: [PATCH 1/6] drm/msm/a6xx: Add support for Adreno 612
Date: Fri, 24 Oct 2025 04:27:42 +0530 [thread overview]
Message-ID: <97aeb6a1-fda2-440f-b14b-2f3dbc2d7e8e@oss.qualcomm.com> (raw)
In-Reply-To: <44ff81bf-8970-475c-a4f5-c03220bc8c3f@oss.qualcomm.com>
On 10/22/2025 8:43 PM, Konrad Dybcio wrote:
> On 10/17/25 7:08 PM, Akhil P Oommen wrote:
>> From: Jie Zhang <quic_jiezh@quicinc.com>
>>
>> Add support for Adreno 612 GPU found in SM6150/QCS615 chipsets.
>> A612 falls under ADRENO_6XX_GEN1 family and is a cut down version
>> of A615 GPU.
>>
>> A612 has a new IP called Reduced Graphics Management Unit or RGMU
>> which is a small state machine which helps to toggle GX GDSC
>> (connected to CX rail) to implement IFPC feature. It doesn't support
>> any other features of a full fledged GMU like clock control, resource
>> voting to rpmh etc. So we need linux clock driver support like other
>> gmu-wrapper implementations to control gpu core clock and gpu GX gdsc.
>> This patch skips RGMU core initialization and act more like a
>> gmu-wrapper case.
>>
>> Co-developed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
>> Signed-off-by: Jie Zhang <quic_jiezh@quicinc.com>
>> Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
>> ---
>
> [...]
>
>> @@ -350,12 +350,18 @@ static const struct a6xx_gmu_oob_bits a6xx_gmu_oob_bits[] = {
>> /* Trigger a OOB (out of band) request to the GMU */
>> int a6xx_gmu_set_oob(struct a6xx_gmu *gmu, enum a6xx_gmu_oob_state state)
>> {
>> + struct a6xx_gpu *a6xx_gpu = container_of(gmu, struct a6xx_gpu, gmu);
>> + struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;
>> int ret;
>> u32 val;
>> int request, ack;
>>
>> WARN_ON_ONCE(!mutex_is_locked(&gmu->lock));
>>
>> + /* Skip OOB calls since RGMU is not enabled */
>
> "RGMU doesn't handle OOB calls"
Technically RGMU can handle OOB calls. But we are not initializing rgmu.
>
> [...]
>
>> +int a6xx_rgmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
>> +{
>> + struct platform_device *pdev = of_find_device_by_node(node);
>> + struct a6xx_gmu *gmu = &a6xx_gpu->gmu;
>> + int ret;
>> +
>> + if (!pdev)
>> + return -ENODEV;
>> +
>> + gmu->dev = &pdev->dev;
>> +
>> + ret = of_dma_configure(gmu->dev, node, true);
>> + if (ret)
>> + return ret;
>> +
>> + pm_runtime_enable(gmu->dev);
>> +
>> + /* Mark legacy for manual SPTPRAC control */
>> + gmu->legacy = true;
>> +
>> + /* RGMU requires clocks */
>> + ret = devm_clk_bulk_get_all(gmu->dev, &gmu->clocks);
>> + if (ret < 1)
>> + return ret;
>
> Simply add this clock detail to a6xx_gmu_wrapper_init and use _optional
Hmm. It looks like devm_clk_bulk_get_all() returns 0 if there are no
clocks. Will squash.
>
> [...]
>
>> /* Enable fault detection */
>> if (adreno_is_a730(adreno_gpu) ||
>> - adreno_is_a740_family(adreno_gpu))
>> + adreno_is_a740_family(adreno_gpu) || adreno_is_a612(adreno_gpu))
>
> Sorting this would be neat
Ack
>
> [...]
>
>> +static int a6xx_rgmu_pm_resume(struct msm_gpu *gpu)
>> +{
>> + struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
>> + struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu);
>> + struct a6xx_gmu *gmu = &a6xx_gpu->gmu;
>> + unsigned long freq = gpu->fast_rate;
>> + struct dev_pm_opp *opp;
>> + int ret;
>> +
>> + gpu->needs_hw_init = true;
>> +
>> + trace_msm_gpu_resume(0);
>> +
>> + opp = dev_pm_opp_find_freq_ceil(&gpu->pdev->dev, &freq);
>> + if (IS_ERR(opp))
>> + return PTR_ERR(opp);
>> +
>> + dev_pm_opp_put(opp);
>> +
>> + /* Set the core clock and bus bw, having VDD scaling in mind */
>> + dev_pm_opp_set_opp(&gpu->pdev->dev, opp);
>> +
>> + pm_runtime_resume_and_get(gmu->dev);
>> + pm_runtime_resume_and_get(gmu->gxpd);
>> +
>> + ret = clk_bulk_prepare_enable(gmu->nr_clocks, gmu->clocks);
>> + if (ret)
>> + goto err_rpm_put;
>> +
>> + ret = clk_bulk_prepare_enable(gpu->nr_clocks, gpu->grp_clks);
>> + if (ret)
>> + goto err_bulk_clk;
>
> Add this as-is to a6xx_pm_resume(), nr_clocks==0 is valid, similarly
> for _suspend
The other difference is a6xx_llc_activate/deactivate(). Looks to me that
we can unconditionally add that too to a6xx_pm_resume().
-Akhil
>
> Konrad
next prev parent reply other threads:[~2025-10-23 22:57 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 17:08 [PATCH 0/6] Support for Adreno 612 GPU - Respin Akhil P Oommen
2025-10-17 17:08 ` [PATCH 1/6] drm/msm/a6xx: Add support for Adreno 612 Akhil P Oommen
2025-10-21 14:15 ` Dan Carpenter
2025-10-23 22:59 ` Akhil P Oommen
2025-10-22 15:13 ` Konrad Dybcio
2025-10-23 22:57 ` Akhil P Oommen [this message]
2025-10-24 7:55 ` Konrad Dybcio
2025-10-24 13:16 ` Rob Clark
2025-10-24 14:23 ` Akhil P Oommen
2025-11-03 11:44 ` Konrad Dybcio
2025-11-03 11:44 ` Konrad Dybcio
2025-10-17 17:08 ` [PATCH 2/6] dt-bindings: display/msm: gpu: Document A612 GPU Akhil P Oommen
2025-10-19 9:10 ` Krzysztof Kozlowski
2025-10-21 14:39 ` Akhil P Oommen
2025-10-17 17:08 ` [PATCH 3/6] dt-bindings: display/msm/gmu: Document A612 RGMU Akhil P Oommen
2025-10-19 9:13 ` Krzysztof Kozlowski
2025-10-21 15:51 ` Akhil P Oommen
2025-10-21 19:19 ` Krzysztof Kozlowski
2025-10-23 23:03 ` Akhil P Oommen
2025-10-24 9:28 ` Dmitry Baryshkov
2025-10-24 14:10 ` Akhil P Oommen
2025-10-17 17:08 ` [PATCH 4/6] arm64: dts: qcom: qcs615: add the GPU SMMU node Akhil P Oommen
2025-11-03 11:54 ` Konrad Dybcio
2025-10-17 17:08 ` [PATCH 5/6] arm64: dts: qcom: qcs615: Add gpu and rgmu nodes Akhil P Oommen
2025-10-22 15:27 ` Konrad Dybcio
2025-10-23 22:17 ` Akhil P Oommen
2025-10-24 7:40 ` Konrad Dybcio
2025-10-17 17:08 ` [PATCH 6/6] arm64: dts: qcom: qcs615-ride: Enable Adreno 612 GPU Akhil P Oommen
2025-10-20 7:57 ` Konrad Dybcio
2025-10-17 21:53 ` [PATCH 0/6] Support for Adreno 612 GPU - Respin Rob Herring (Arm)
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=97aeb6a1-fda2-440f-b14b-2f3dbc2d7e8e@oss.qualcomm.com \
--to=akhilpo@oss.qualcomm.com \
--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=jessica.zhang@oss.qualcomm.com \
--cc=konrad.dybcio@oss.qualcomm.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=quic_jiezh@quicinc.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