From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Akhil P Oommen <quic_akhilpo@quicinc.com>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Clark <robdclark@chromium.org>,
Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Johan Hovold <johan+linaro@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v2 06/13] drm/msm/adreno: Allow SoC specific gpu device table entries
Date: Thu, 27 Jul 2023 14:20:11 -0700 [thread overview]
Message-ID: <20230727212208.102501-7-robdclark@gmail.com> (raw)
In-Reply-To: <20230727212208.102501-1-robdclark@gmail.com>
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>
---
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];
--
2.41.0
next prev parent reply other threads:[~2023-07-27 21:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 21:20 [PATCH v2 00/13] drm/msm/adreno: Move away from legacy revision matching Rob Clark
2023-07-27 21:20 ` [PATCH v2 01/13] drm/msm/adreno: Remove GPU name Rob Clark
2023-07-27 21:20 ` [PATCH v2 02/13] drm/msm/adreno: Remove redundant gmem size param Rob Clark
2023-07-27 22:07 ` Dmitry Baryshkov
2023-07-27 21:20 ` [PATCH v2 03/13] drm/msm/adreno: Remove redundant revn param Rob Clark
2023-07-27 21:20 ` [PATCH v2 04/13] drm/msm/adreno: Use quirk identify hw_apriv Rob Clark
2023-07-27 21:20 ` [PATCH v2 05/13] drm/msm/adreno: Use quirk to identify cached-coherent support Rob Clark
2023-07-27 22:08 ` Dmitry Baryshkov
2023-07-27 21:20 ` Rob Clark [this message]
2023-07-27 22:12 ` [PATCH v2 06/13] drm/msm/adreno: Allow SoC specific gpu device table entries Dmitry Baryshkov
2023-07-28 15:43 ` Rob Clark
2023-07-27 21:20 ` [PATCH v2 07/13] drm/msm/adreno: Move speedbin mapping to device table Rob Clark
2023-07-27 22:12 ` Dmitry Baryshkov
2023-07-27 21:20 ` [PATCH v2 08/13] drm/msm/adreno: Bring the a630 family together Rob Clark
2023-07-27 21:20 ` [PATCH v2 09/13] drm/msm/adreno: Add adreno family Rob Clark
2023-07-27 22:15 ` Dmitry Baryshkov
2023-07-27 21:20 ` [PATCH v2 10/13] drm/msm/adreno: Add helper for formating chip-id Rob Clark
2023-07-27 21:20 ` [PATCH v2 11/13] drm/msm/adreno: Move adreno info to config Rob Clark
2023-07-27 22:50 ` Dmitry Baryshkov
2023-07-27 21:20 ` [PATCH v2 12/13] dt-bindings: drm/msm/gpu: Extend bindings for chip-id Rob Clark
2023-07-28 7:27 ` Krzysztof Kozlowski
2023-07-28 15:29 ` Rob Clark
2023-07-27 21:20 ` [PATCH v2 13/13] drm/msm/adreno: Switch to chip-id for identifying GPU Rob Clark
2023-08-04 15:28 ` 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=20230727212208.102501-7-robdclark@gmail.com \
--to=robdclark@gmail.com \
--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=johan+linaro@kernel.org \
--cc=konrad.dybcio@linaro.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@chromium.org \
--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