Merge "msm: kgsl: Add support for A616 GPU"
diff --git a/drivers/gpu/msm/adreno-gpulist.h b/drivers/gpu/msm/adreno-gpulist.h
index 2aff383..1fb76dd 100644
--- a/drivers/gpu/msm/adreno-gpulist.h
+++ b/drivers/gpu/msm/adreno-gpulist.h
@@ -379,4 +379,22 @@
.gpmu_major = 0x1,
.gpmu_minor = 0x003,
},
+ {
+ .gpurev = ADRENO_REV_A616,
+ .core = 6,
+ .major = 1,
+ .minor = 6,
+ .patchid = ANY_ID,
+ .features = ADRENO_64BIT | ADRENO_RPMH | ADRENO_PREEMPTION |
+ ADRENO_GPMU | ADRENO_CONTENT_PROTECTION | ADRENO_IFPC,
+ .sqefw_name = "a630_sqe.fw",
+ .zap_name = "a615_zap",
+ .gpudev = &adreno_a6xx_gpudev,
+ .gmem_size = SZ_512K,
+ .num_protected_regs = 0x20,
+ .busy_mask = 0xFFFFFFFE,
+ .gpmufw_name = "a630_gmu.bin",
+ .gpmu_major = 0x1,
+ .gpmu_minor = 0x003,
+ },
};
diff --git a/drivers/gpu/msm/adreno.h b/drivers/gpu/msm/adreno.h
index 8785d62..9ca22fd 100644
--- a/drivers/gpu/msm/adreno.h
+++ b/drivers/gpu/msm/adreno.h
@@ -211,6 +211,7 @@
ADRENO_REV_A530 = 530,
ADRENO_REV_A540 = 540,
ADRENO_REV_A615 = 615,
+ ADRENO_REV_A616 = 616,
ADRENO_REV_A630 = 630,
};
@@ -1251,6 +1252,7 @@
}
ADRENO_TARGET(a615, ADRENO_REV_A615)
+ADRENO_TARGET(a616, ADRENO_REV_A616)
ADRENO_TARGET(a630, ADRENO_REV_A630)
static inline int adreno_is_a630v1(struct adreno_device *adreno_dev)
@@ -1878,7 +1880,7 @@
static inline bool adreno_has_gbif(struct adreno_device *adreno_dev)
{
- if (adreno_is_a615(adreno_dev))
+ if (adreno_is_a615(adreno_dev) || adreno_is_a616(adreno_dev))
return true;
else
return false;
diff --git a/drivers/gpu/msm/adreno_a6xx.c b/drivers/gpu/msm/adreno_a6xx.c
index daf314d..7096d7c 100644
--- a/drivers/gpu/msm/adreno_a6xx.c
+++ b/drivers/gpu/msm/adreno_a6xx.c
@@ -61,6 +61,7 @@
static const struct adreno_vbif_platform a6xx_vbif_platforms[] = {
{ adreno_is_a630, a630_vbif },
{ adreno_is_a615, a615_gbif },
+ { adreno_is_a616, a615_gbif },
};
@@ -251,6 +252,7 @@
} a6xx_hwcg_registers[] = {
{adreno_is_a630, a630_hwcg_regs, ARRAY_SIZE(a630_hwcg_regs)},
{adreno_is_a615, a615_hwcg_regs, ARRAY_SIZE(a615_hwcg_regs)},
+ {adreno_is_a616, a615_hwcg_regs, ARRAY_SIZE(a615_hwcg_regs)},
};
static struct a6xx_protected_regs {
@@ -499,7 +501,7 @@
static inline unsigned int
__get_rbbm_clock_cntl_on(struct adreno_device *adreno_dev)
{
- if (adreno_is_a615(adreno_dev))
+ if (adreno_is_a615(adreno_dev) || adreno_is_a616(adreno_dev))
return 0x8AA8AA82;
else
return 0x8AA8AA02;
@@ -508,7 +510,7 @@
static inline unsigned int
__get_gmu_ao_cgc_mode_cntl(struct adreno_device *adreno_dev)
{
- if (adreno_is_a615(adreno_dev))
+ if (adreno_is_a615(adreno_dev) || adreno_is_a616(adreno_dev))
return 0x00000222;
else
return 0x00020202;
@@ -517,7 +519,7 @@
static inline unsigned int
__get_gmu_ao_cgc_delay_cntl(struct adreno_device *adreno_dev)
{
- if (adreno_is_a615(adreno_dev))
+ if (adreno_is_a615(adreno_dev) || adreno_is_a616(adreno_dev))
return 0x00000111;
else
return 0x00010111;
@@ -526,7 +528,7 @@
static inline unsigned int
__get_gmu_ao_cgc_hyst_cntl(struct adreno_device *adreno_dev)
{
- if (adreno_is_a615(adreno_dev))
+ if (adreno_is_a615(adreno_dev) || adreno_is_a616(adreno_dev))
return 0x00000555;
else
return 0x00005555;
@@ -643,7 +645,7 @@
+ sizeof(a6xx_ifpc_pwrup_reglist), a6xx_pwrup_reglist,
sizeof(a6xx_pwrup_reglist));
- if (adreno_is_a615(adreno_dev)) {
+ if (adreno_is_a615(adreno_dev) || adreno_is_a616(adreno_dev)) {
for (i = 0; i < ARRAY_SIZE(a615_pwrup_reglist); i++) {
r = &a615_pwrup_reglist[i];
kgsl_regread(KGSL_DEVICE(adreno_dev),
@@ -3587,6 +3589,7 @@
void (*func)(struct adreno_device *adreno_dev);
} a6xx_efuse_funcs[] = {
{ adreno_is_a615, a6xx_efuse_speed_bin },
+ { adreno_is_a616, a6xx_efuse_speed_bin },
};
static void a6xx_check_features(struct adreno_device *adreno_dev)
diff --git a/drivers/gpu/msm/adreno_a6xx_snapshot.c b/drivers/gpu/msm/adreno_a6xx_snapshot.c
index afd1be5..7376a38 100644
--- a/drivers/gpu/msm/adreno_a6xx_snapshot.c
+++ b/drivers/gpu/msm/adreno_a6xx_snapshot.c
@@ -1169,7 +1169,8 @@
block_id = block->block_id;
/* GMU_GX data is read using the GMU_CX block id on A630 */
- if ((adreno_is_a630(adreno_dev) || adreno_is_a615(adreno_dev)) &&
+ if ((adreno_is_a630(adreno_dev) || adreno_is_a615(adreno_dev) ||
+ adreno_is_a616(adreno_dev)) &&
(block_id == A6XX_DBGBUS_GMU_GX))
block_id = A6XX_DBGBUS_GMU_CX;