Skip to content

Commit 2c4c53f

Browse files
Akhil P Oommenrobclark
authored andcommitted
drm/msm/adreno: Introduce gmu_chipid for a740 & a750
To simplify, introduce the new gmu_chipid for a740 & a750 GPUs. Signed-off-by: Akhil P Oommen <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/601396/ Signed-off-by: Rob Clark <[email protected]>
1 parent d6225e0 commit 2c4c53f

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

drivers/gpu/drm/msm/adreno/a6xx_catalog.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,7 @@ static const struct adreno_info a7xx_gpus[] = {
12061206
.a6xx = &(const struct a6xx_info) {
12071207
.hwcg = a740_hwcg,
12081208
.protect = &a730_protect,
1209+
.gmu_chipid = 0x7020100,
12091210
},
12101211
.address_space_size = SZ_16G,
12111212
}, {
@@ -1241,6 +1242,7 @@ static const struct adreno_info a7xx_gpus[] = {
12411242
.zapfw = "gen70900_zap.mbn",
12421243
.a6xx = &(const struct a6xx_info) {
12431244
.protect = &a730_protect,
1245+
.gmu_chipid = 0x7090100,
12441246
},
12451247
.address_space_size = SZ_16G,
12461248
}

drivers/gpu/drm/msm/adreno/a6xx_gmu.c

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ static int a6xx_gmu_fw_start(struct a6xx_gmu *gmu, unsigned int state)
769769
struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;
770770
const struct a6xx_info *a6xx_info = adreno_gpu->info->a6xx;
771771
u32 fence_range_lower, fence_range_upper;
772-
u32 chipid, chipid_min = 0;
772+
u32 chipid = 0;
773773
int ret;
774774

775775
/* Vote veto for FAL10 */
@@ -831,27 +831,6 @@ static int a6xx_gmu_fw_start(struct a6xx_gmu *gmu, unsigned int state)
831831

832832
if (a6xx_info->gmu_chipid) {
833833
chipid = a6xx_info->gmu_chipid;
834-
/* NOTE: A730 may also fall in this if-condition with a future GMU fw update. */
835-
} else if (adreno_is_a7xx(adreno_gpu) && !adreno_is_a730(adreno_gpu)) {
836-
/* A7xx GPUs have obfuscated chip IDs. Use constant maj = 7 */
837-
chipid = FIELD_PREP(GENMASK(31, 24), 0x7);
838-
839-
/*
840-
* The min part has a 1-1 mapping for each GPU SKU.
841-
* This chipid that the GMU expects corresponds to the "GENX_Y_Z" naming,
842-
* where X = major, Y = minor, Z = patchlevel, e.g. GEN7_2_1 for prod A740.
843-
*/
844-
if (adreno_is_a740(adreno_gpu))
845-
chipid_min = 2;
846-
else if (adreno_is_a750(adreno_gpu))
847-
chipid_min = 9;
848-
else
849-
return -EINVAL;
850-
851-
chipid |= FIELD_PREP(GENMASK(23, 16), chipid_min);
852-
853-
/* Get the patchid (which may vary) from the device tree */
854-
chipid |= FIELD_PREP(GENMASK(15, 8), adreno_patchid(adreno_gpu));
855834
} else {
856835
/*
857836
* Note that the GMU has a slightly different layout for

0 commit comments

Comments
 (0)