From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Rob Clark <robdclark@gmail.com>, dri-devel@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
Rob Clark <robdclark@chromium.org>
Subject: Re: [PATCH 06/12] drm/msm/adreno: Allow SoC specific gpu device table entries
Date: Fri, 7 Jul 2023 02:40:47 +0200 [thread overview]
Message-ID: <8ee1601d-eb39-2d51-ae52-9bb897a96c07@linaro.org> (raw)
In-Reply-To: <20230706211045.204925-7-robdclark@gmail.com>
On 6.07.2023 23:10, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
>
> There are cases where there are differences due to SoC integration.
> Such as cache-coherency support, and (in the next patch) e-fuse to
> speedbin mappings.
>
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
of_machine_is_compatible is rather used in extremely desperate
situations :/ I'm not sure this is the correct way to do this..
Especially since there's a direct correlation between GMU presence
and ability to do cached coherent.
The GMU mandates presence of RPMh (as most of what the GMU does is
talk to AOSS through its RSC).
To achieve I/O coherency, there must be some memory that both the
CPU and GPU (and possibly others) can access through some sort of
a negotiator/manager.
In our case, I believe that's LLC. And guess what that implies.
MEMNOC instead of BIMC. And guess what that implies. RPMh!
Now, we know GMU => RPMh, but does it work the other way around?
Yes. GMU wrapper was a hack because probably nobody in the Adreno team
would have imagined that somebody would be crazy enough to fork
multiple year old designs multiple times and release them as new
SoCs with updated arm cores and 5G..
(Except for A612 which has a "Reduced GMU" but that zombie still talks
to RPMh. And A612 is IO-coherent. So I guess it works anyway.)
Konrad
> drivers/gpu/drm/msm/adreno/adreno_device.c | 34 +++++++++++++++++++---
> drivers/gpu/drm/msm/adreno/adreno_gpu.h | 1 +
> 2 files changed, 31 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
> index 3c531da417b9..e62bc895a31f 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
> @@ -258,6 +258,32 @@ static const struct adreno_info gpulist[] = {
> .inactive_period = DRM_MSM_INACTIVE_PERIOD,
> .quirks = ADRENO_QUIRK_HAS_CACHED_COHERENT,
> .init = a6xx_gpu_init,
> + }, {
> + .machine = "qcom,sm4350",
> + .rev = ADRENO_REV(6, 1, 9, ANY_ID),
> + .revn = 619,
> + .fw = {
> + [ADRENO_FW_SQE] = "a630_sqe.fw",
> + [ADRENO_FW_GMU] = "a619_gmu.bin",
> + },
> + .gmem = SZ_512K,
> + .inactive_period = DRM_MSM_INACTIVE_PERIOD,
> + .init = a6xx_gpu_init,
> + .zapfw = "a615_zap.mdt",
> + .hwcg = a615_hwcg,
> + }, {
> + .machine = "qcom,sm6375",
> + .rev = ADRENO_REV(6, 1, 9, ANY_ID),
> + .revn = 619,
> + .fw = {
> + [ADRENO_FW_SQE] = "a630_sqe.fw",
> + [ADRENO_FW_GMU] = "a619_gmu.bin",
> + },
> + .gmem = SZ_512K,
> + .inactive_period = DRM_MSM_INACTIVE_PERIOD,
> + .init = a6xx_gpu_init,
> + .zapfw = "a615_zap.mdt",
> + .hwcg = a615_hwcg,
> }, {
> .rev = ADRENO_REV(6, 1, 9, ANY_ID),
> .revn = 619,
> @@ -409,6 +435,8 @@ const struct adreno_info *adreno_info(struct adreno_rev rev)
> /* identify gpu: */
> for (i = 0; i < ARRAY_SIZE(gpulist); i++) {
> const struct adreno_info *info = &gpulist[i];
> + if (info->machine && !of_machine_is_compatible(info->machine))
> + continue;
> if (adreno_cmp_rev(info->rev, rev))
> return info;
> }
> @@ -563,6 +591,8 @@ static int adreno_bind(struct device *dev, struct device *master, void *data)
> config.rev.minor, config.rev.patchid);
>
> priv->is_a2xx = config.rev.core == 2;
> + priv->has_cached_coherent =
> + !!(info->quirks & ADRENO_QUIRK_HAS_CACHED_COHERENT);
>
> gpu = info->init(drm);
> if (IS_ERR(gpu)) {
> @@ -574,10 +604,6 @@ static int adreno_bind(struct device *dev, struct device *master, void *data)
> if (ret)
> return ret;
>
> - priv->has_cached_coherent =
> - !!(info->quirks & ADRENO_QUIRK_HAS_CACHED_COHERENT) &&
> - !adreno_has_gmu_wrapper(to_adreno_gpu(gpu));
> -
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> index e08d41337169..d5335b99c64c 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> @@ -61,6 +61,7 @@ extern const struct adreno_reglist a612_hwcg[], a615_hwcg[], a630_hwcg[], a640_h
> extern const struct adreno_reglist a660_hwcg[], a690_hwcg[];
>
> struct adreno_info {
> + const char *machine;
> struct adreno_rev rev;
> uint32_t revn;
> const char *fw[ADRENO_FW_MAX];
next prev parent reply other threads:[~2023-07-07 0:40 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-06 21:10 [PATCH 00/12] drm/msm/adreno: Move away from legacy revision matching Rob Clark
2023-07-06 21:10 ` [PATCH 01/12] drm/msm/adreno: Remove GPU name Rob Clark
2023-07-06 23:21 ` Konrad Dybcio
2023-07-07 0:04 ` [Freedreno] " Dmitry Baryshkov
2023-07-06 21:10 ` [PATCH 02/12] drm/msm/adreno: Remove redundant gmem size param Rob Clark
2023-07-06 23:22 ` Konrad Dybcio
2023-07-13 19:46 ` Akhil P Oommen
2023-07-07 2:23 ` [Freedreno] " Dmitry Baryshkov
2023-07-06 21:10 ` [PATCH 03/12] drm/msm/adreno: Remove redundant revn param Rob Clark
2023-07-06 23:26 ` Konrad Dybcio
2023-07-07 2:24 ` [Freedreno] " Dmitry Baryshkov
2023-07-06 21:10 ` [PATCH 04/12] drm/msm/adreno: Use quirk identify hw_apriv Rob Clark
2023-07-06 23:27 ` Konrad Dybcio
2023-07-07 2:25 ` [Freedreno] " Dmitry Baryshkov
2023-07-06 21:10 ` [PATCH 05/12] drm/msm/adreno: Use quirk to identify cached-coherent support Rob Clark
2023-07-06 23:29 ` Konrad Dybcio
2023-07-07 2:29 ` [Freedreno] " Dmitry Baryshkov
2023-07-07 15:53 ` Rob Clark
2023-07-13 20:05 ` Akhil P Oommen
2023-07-13 22:25 ` Rob Clark
2023-07-17 22:00 ` Akhil P Oommen
2023-07-06 21:10 ` [PATCH 06/12] drm/msm/adreno: Allow SoC specific gpu device table entries Rob Clark
2023-07-07 0:40 ` Konrad Dybcio [this message]
2023-07-13 22:15 ` [Freedreno] " Akhil P Oommen
2023-07-07 2:34 ` Dmitry Baryshkov
2023-07-13 20:26 ` Akhil P Oommen
2023-07-26 18:28 ` Rob Clark
2023-07-26 20:00 ` Dmitry Baryshkov
2023-07-26 20:11 ` Rob Clark
2023-07-26 21:43 ` Dmitry Baryshkov
2023-07-26 22:03 ` Rob Clark
2023-07-26 22:33 ` Dmitry Baryshkov
2023-07-26 22:53 ` Rob Clark
2023-07-27 7:51 ` Konrad Dybcio
2023-07-27 14:52 ` Rob Clark
2023-07-27 21:13 ` Rob Clark
2023-07-27 22:02 ` Dmitry Baryshkov
2023-07-28 14:43 ` Rob Clark
2023-07-28 14:51 ` Dmitry Baryshkov
2023-07-06 21:10 ` [PATCH 07/12] drm/msm/adreno: Move speedbin mapping to device table Rob Clark
2023-07-07 2:54 ` [Freedreno] " Dmitry Baryshkov
2023-07-10 19:56 ` Rob Clark
2023-07-10 20:54 ` Dmitry Baryshkov
2023-07-06 21:10 ` [PATCH 08/12] drm/msm/adreno: Bring the a630 family together Rob Clark
2023-07-06 23:32 ` Konrad Dybcio
2023-07-06 21:10 ` [PATCH 09/12] drm/msm/adreno: Add adreno family Rob Clark
2023-07-06 23:35 ` Konrad Dybcio
2023-07-07 3:16 ` Dmitry Baryshkov
2023-07-07 23:52 ` Rob Clark
2023-07-07 23:54 ` Dmitry Baryshkov
2023-07-07 2:49 ` [Freedreno] " Dmitry Baryshkov
2023-07-06 21:10 ` [PATCH 10/12] drm/msm/adreno: Add helper for formating chip-id Rob Clark
2023-07-06 23:36 ` Konrad Dybcio
2023-07-10 20:21 ` Rob Clark
2023-07-07 2:50 ` [Freedreno] " Dmitry Baryshkov
2023-07-06 21:10 ` [PATCH 11/12] dt-bindings: drm/msm/gpu: Extend bindings for chip-id Rob Clark
2023-07-07 7:26 ` Krzysztof Kozlowski
2023-07-07 13:09 ` Rob Clark
2023-07-06 21:10 ` [PATCH 12/12] drm/msm/adreno: Switch to chip-id for identifying GPU Rob Clark
2023-07-07 0:25 ` Konrad Dybcio
2023-07-07 16:08 ` Rob Clark
2023-07-15 13:38 ` Konrad Dybcio
2023-07-15 14:12 ` Rob Clark
2023-07-26 21:45 ` Rob Clark
2023-07-07 3:45 ` [Freedreno] " Dmitry Baryshkov
2023-07-13 21:39 ` Akhil P Oommen
2023-07-13 22:06 ` Rob Clark
2023-07-13 22:53 ` Dmitry Baryshkov
2023-07-17 22:09 ` Akhil P Oommen
2023-07-26 21:37 ` Rob Clark
2023-07-26 21:38 ` Dmitry Baryshkov
2023-07-26 21:44 ` Rob Clark
2023-07-26 21:45 ` Dmitry Baryshkov
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=8ee1601d-eb39-2d51-ae52-9bb897a96c07@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
/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