[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241125-a612-gpu-support-v2-1-b7cc38e60191@quicinc.com>
Date: Mon, 25 Nov 2024 22:03:00 +0530
From: Akhil P Oommen <quic_akhilpo@...cinc.com>
To: Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>,
"Konrad
Dybcio" <konradybcio@...nel.org>,
Abhinav Kumar <quic_abhinavk@...cinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Marijn Suijten
<marijn.suijten@...ainline.org>,
David Airlie <airlied@...il.com>, "Simona
Vetter" <simona@...ll.ch>
CC: <linux-arm-msm@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
<freedreno@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
"Akhil P
Oommen" <quic_akhilpo@...cinc.com>
Subject: [PATCH v2 1/2] drm/msm/adreno: Introduce ADRENO_QUIRK_NO_SYSCACHE
There are a few chipsets which don't have system cache a.k.a LLC.
Currently, the assumption in the driver is that the system cache
availability correlates with the presence of GMU or RPMH, which
is not true. For instance, Snapdragon 6 Gen 1 has RPMH and a GPU
with a full blown GMU, but doesnot have a system cache. So,
introduce an Adreno Quirk flag to check support for system cache
instead of using gmu_wrapper flag.
Signed-off-by: Akhil P Oommen <quic_akhilpo@...cinc.com>
---
drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 3 ++-
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 +------
drivers/gpu/drm/msm/adreno/adreno_gpu.h | 1 +
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_catalog.c b/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
index 0c560e84ad5a..5e389f6b8b8a 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
@@ -682,6 +682,7 @@ static const struct adreno_info a6xx_gpus[] = {
},
.gmem = (SZ_128K + SZ_4K),
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
+ .quirks = ADRENO_QUIRK_NO_SYSCACHE,
.init = a6xx_gpu_init,
.zapfw = "a610_zap.mdt",
.a6xx = &(const struct a6xx_info) {
@@ -1331,7 +1332,7 @@ static const struct adreno_info a7xx_gpus[] = {
},
.gmem = SZ_128K,
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
- .quirks = ADRENO_QUIRK_HAS_HW_APRIV,
+ .quirks = ADRENO_QUIRK_HAS_HW_APRIV | ADRENO_QUIRK_NO_SYSCACHE,
.init = a6xx_gpu_init,
.zapfw = "a702_zap.mbn",
.a6xx = &(const struct a6xx_info) {
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 019610341df1..a8b928d0f320 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -1863,10 +1863,6 @@ static void a7xx_llc_activate(struct a6xx_gpu *a6xx_gpu)
static void a6xx_llc_slices_destroy(struct a6xx_gpu *a6xx_gpu)
{
- /* No LLCC on non-RPMh (and by extension, non-GMU) SoCs */
- if (adreno_has_gmu_wrapper(&a6xx_gpu->base))
- return;
-
llcc_slice_putd(a6xx_gpu->llc_slice);
llcc_slice_putd(a6xx_gpu->htw_llc_slice);
}
@@ -1876,8 +1872,7 @@ static void a6xx_llc_slices_init(struct platform_device *pdev,
{
struct device_node *phandle;
- /* No LLCC on non-RPMh (and by extension, non-GMU) SoCs */
- if (adreno_has_gmu_wrapper(&a6xx_gpu->base))
+ if (a6xx_gpu->base.info->quirks & ADRENO_QUIRK_NO_SYSCACHE)
return;
/*
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
index e71f420f8b3a..398be2218110 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
@@ -57,6 +57,7 @@ enum adreno_family {
#define ADRENO_QUIRK_HAS_HW_APRIV BIT(3)
#define ADRENO_QUIRK_HAS_CACHED_COHERENT BIT(4)
#define ADRENO_QUIRK_PREEMPTION BIT(5)
+#define ADRENO_QUIRK_NO_SYSCACHE BIT(6)
/* Helper for formating the chip_id in the way that userspace tools like
* crashdec expect.
--
2.45.2
Powered by blists - more mailing lists