summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAkhil P Oommen <akhilpo@oss.qualcomm.com>2026-09-23 15:55:48 +0530
committerRob Clark <robin.clark@oss.qualcomm.com>2026-09-27 08:18:21 -0700
commit95233fdc48db5e01cb027fe46aec3721c2c2fead (patch)
treece2889978f29c64c49e6448147f2dbe0cb6dbb9c /drivers/gpu
parentb0e029f7cf8717ef12d608ad91daced08b056cc3 (diff)
drm/msm/a6xx: Send THINMEM config to GMU for A850
Add HFI support for the GMU THINMEM_CFG feature and provide the configuration value used by the Adreno 850 GPU in the catalog. Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/755603/ Message-ID: <20260923-hawi-gpu-v1-8-0c3c79a1a470@oss.qualcomm.com> Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/msm/adreno/a6xx_catalog.c1
-rw-r--r--drivers/gpu/drm/msm/adreno/a6xx_gpu.h2
-rw-r--r--drivers/gpu/drm/msm/adreno/a6xx_hfi.c25
-rw-r--r--drivers/gpu/drm/msm/adreno/a6xx_hfi.h1
4 files changed, 29 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_catalog.c b/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
index ae906b24f81d..e43aa0626df4 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
@@ -3396,6 +3396,7 @@ static const struct adreno_info a8xx_gpus[] = {
.gbif_cx = a850_gbif,
.max_slices = 3,
.gmu_chipid = 0x80b0100,
+ .thinmem_config = 14,
.bcms = (const struct a6xx_bcm[]) {
{ .name = "SH0", .buswidth = 32 },
{ .name = "MC0", .buswidth = 4 },
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
index a4b197be7e1a..79912a33e17c 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h
@@ -55,6 +55,7 @@ static const struct a6xx_limits_tbl name = { \
* @hwcg: hw clock gating register sequence
* @protect: CP_PROTECT settings
* @pwrup_reglist pwrup reglist for preemption
+ * @thinmem_config: GMU thinmem configuration
*/
struct a6xx_info {
const struct adreno_reglist *hwcg;
@@ -71,6 +72,7 @@ struct a6xx_info {
const struct a6xx_bcm *bcms;
const struct a6xx_hfi_clx_table_v2_cmd *clx_tbl;
const struct a6xx_limits_tbl *limits_tbl;
+ u32 thinmem_config;
};
struct a6xx_gpu {
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
index 16a94d210844..6b34e704a70d 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
@@ -955,6 +955,27 @@ static int a6xx_hfi_enable_clx(struct a6xx_gmu *gmu)
return a6xx_hfi_enable_iff_pclx(gmu, info->limits_tbl);
}
+static int a6xx_hfi_send_thinmem_config(struct a6xx_gmu *gmu)
+{
+ struct a6xx_gpu *a6xx_gpu = container_of(gmu, struct a6xx_gpu, gmu);
+ struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;
+ const struct a6xx_info *info = adreno_gpu->info->a6xx;
+ u32 data;
+ int ret;
+
+ if (!info->thinmem_config)
+ return 0;
+
+ /* Bits [7:4] contain the thinmem_cfg data. */
+ data = FIELD_PREP(GENMASK(7, 4), info->thinmem_config);
+
+ ret = a6xx_hfi_feature_ctrl_msg(gmu, HFI_FEATURE_THINMEM_CFG, 1, data);
+ if (ret)
+ DRM_DEV_ERROR(gmu->dev, "Unable to send THINMEM_CFG (%d)\n", ret);
+
+ return ret;
+}
+
static int a6xx_hfi_send_test(struct a6xx_gmu *gmu)
{
struct a6xx_hfi_msg_test msg = { 0 };
@@ -1064,6 +1085,10 @@ int a6xx_hfi_start(struct a6xx_gmu *gmu, int boot_state)
if (ret)
return ret;
+ ret = a6xx_hfi_send_thinmem_config(gmu);
+ if (ret)
+ return ret;
+
ret = a6xx_hfi_send_core_fw_start(gmu);
if (ret)
return ret;
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_hfi.h b/drivers/gpu/drm/msm/adreno/a6xx_hfi.h
index e10d32ce93e0..5123349a3de6 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_hfi.h
+++ b/drivers/gpu/drm/msm/adreno/a6xx_hfi.h
@@ -244,6 +244,7 @@ struct a6xx_hfi_msg_feature_ctrl {
#define HFI_FEATURE_TDCVS 30
#define HFI_FEATURE_DCE 31
#define HFI_FEATURE_IFF_PCLX 32
+#define HFI_FEATURE_THINMEM_CFG 38
#define HFI_FEATURE_SOFT_RESET 0x10000001
#define HFI_FEATURE_DCVS_PROFILE 0x10000002
#define HFI_FEATURE_FAST_CTX_DESTROY 0x10000003