From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Akhil P Oommen <quic_akhilpo@quicinc.com>,
freedreno <freedreno@lists.freedesktop.org>,
dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
Rob Clark <robdclark@gmail.com>,
Bjorn Andersson <andersson@kernel.org>
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Marijn Suijten <marijn.suijten@somainline.org>,
Sean Paul <sean@poorly.run>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/3] drm/msm/adreno: Add support for X185 GPU
Date: Mon, 24 Jun 2024 15:53:48 +0200 [thread overview]
Message-ID: <5947559d-30dd-4da1-93cc-a15dc65cb77d@linaro.org> (raw)
In-Reply-To: <20240623110753.141400-3-quic_akhilpo@quicinc.com>
On 6/23/24 13:06, Akhil P Oommen wrote:
> Add support in drm/msm driver for the Adreno X185 gpu found in
> Snapdragon X1 Elite chipset.
>
> Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
> ---
>
> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 19 +++++++++++++++----
> drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 ++----
> drivers/gpu/drm/msm/adreno/adreno_device.c | 14 ++++++++++++++
> drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 +++++
> 4 files changed, 36 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> index 0e3dfd4c2bc8..168a4bddfaf2 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> @@ -830,8 +830,10 @@ static int a6xx_gmu_fw_start(struct a6xx_gmu *gmu, unsigned int state)
> */
> gmu_write(gmu, REG_A6XX_GMU_CM3_CFG, 0x4052);
>
> + if (adreno_is_x185(adreno_gpu)) {
> + chipid = 0x7050001;
What's wrong with using the logic below?
> /* NOTE: A730 may also fall in this if-condition with a future GMU fw update. */
> - if (adreno_is_a7xx(adreno_gpu) && !adreno_is_a730(adreno_gpu)) {
> + } else if (adreno_is_a7xx(adreno_gpu) && !adreno_is_a730(adreno_gpu)) {
> /* A7xx GPUs have obfuscated chip IDs. Use constant maj = 7 */
> chipid = FIELD_PREP(GENMASK(31, 24), 0x7);
>
> @@ -1329,9 +1331,18 @@ static int a6xx_gmu_rpmh_arc_votes_init(struct device *dev, u32 *votes,
> if (!pri_count)
> return -EINVAL;
>
> - sec = cmd_db_read_aux_data("mx.lvl", &sec_count);
> - if (IS_ERR(sec))
> - return PTR_ERR(sec);
> + /*
> + * Some targets have a separate gfx mxc rail. So try to read that first and then fall back
> + * to regular mx rail if it is missing
> + */
> + sec = cmd_db_read_aux_data("gmxc.lvl", &sec_count);
> + if (PTR_ERR_OR_ZERO(sec) == -EPROBE_DEFER) {
> + return -EPROBE_DEFER;
> + } else if (IS_ERR(sec)) {
> + sec = cmd_db_read_aux_data("mx.lvl", &sec_count);
> + if (IS_ERR(sec))
> + return PTR_ERR(sec);
> + }
I assume GMXC would always be used if present, although please use the
approach Dmitry suggested
The rest looks good!
Konrad
next prev parent reply other threads:[~2024-06-24 13:53 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-23 11:06 [PATCH v1 0/3] Support for Adreno X1-85 GPU Akhil P Oommen
2024-06-23 11:06 ` [PATCH v1 1/3] dt-bindings: display/msm/gmu: Add Adreno X185 GMU Akhil P Oommen
2024-06-23 11:13 ` Krzysztof Kozlowski
2024-06-23 12:40 ` Krzysztof Kozlowski
2024-06-26 7:46 ` Akhil P Oommen
2024-06-23 11:06 ` [PATCH v1 2/3] drm/msm/adreno: Add support for X185 GPU Akhil P Oommen
2024-06-23 21:21 ` Dmitry Baryshkov
2024-06-26 7:51 ` Akhil P Oommen
2024-06-24 13:53 ` Konrad Dybcio [this message]
2024-06-26 8:24 ` Akhil P Oommen
2024-06-26 9:37 ` Konrad Dybcio
2024-06-26 18:43 ` Rob Clark
2024-06-26 20:52 ` Akhil P Oommen
2024-06-26 21:38 ` Konrad Dybcio
2024-06-26 22:32 ` Rob Clark
2024-06-26 22:40 ` Konrad Dybcio
2024-06-24 14:25 ` Rob Clark
2024-06-24 14:28 ` Rob Clark
2024-06-26 20:49 ` Akhil P Oommen
2024-06-26 21:02 ` Rob Clark
2024-06-23 11:06 ` [PATCH v1 3/3] arm64: dts: qcom: x1e80100: Add gpu support Akhil P Oommen
2024-06-23 11:17 ` Krzysztof Kozlowski
2024-06-23 12:28 ` Akhil P Oommen
2024-06-23 12:53 ` Krzysztof Kozlowski
2024-06-23 15:16 ` Akhil P Oommen
2024-06-23 20:05 ` Krzysztof Kozlowski
2024-06-23 20:40 ` Bjorn Andersson
2024-06-23 21:01 ` Akhil P Oommen
2024-06-23 21:23 ` Dmitry Baryshkov
2024-06-26 21:00 ` Akhil P Oommen
2024-06-24 13:57 ` Konrad Dybcio
2024-06-26 21:04 ` Akhil P Oommen
2024-06-26 21:39 ` Konrad Dybcio
2024-06-27 7:36 ` kernel test robot
2024-06-27 20:22 ` kernel test robot
2024-06-28 13:44 ` kernel test robot
2024-06-29 10:28 ` kernel test robot
2024-06-23 11:11 ` [PATCH v1 0/3] Support for Adreno X1-85 GPU Krzysztof Kozlowski
2024-06-23 21:24 ` Dmitry Baryshkov
2024-06-24 6:21 ` Akhil P Oommen
2024-06-24 10:21 ` Krzysztof Kozlowski
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=5947559d-30dd-4da1-93cc-a15dc65cb77d@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_akhilpo@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
/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®