Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5287eeac authored by Deepak Kumar's avatar Deepak Kumar
Browse files

msm: kgsl: Add support for A616 GPU



Add new GPU ID and required initial settings
to support graphics functionality on SDM710.

Change-Id: I9c553b8f27ba3ee68e5708a8826ac62f2d1f70ed
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent ee50fe6e
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -379,4 +379,22 @@ static const struct adreno_gpu_core adreno_gpulist[] = {
		.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,
	},
};
+3 −1
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ enum adreno_gpurev {
	ADRENO_REV_A530 = 530,
	ADRENO_REV_A540 = 540,
	ADRENO_REV_A615 = 615,
	ADRENO_REV_A616 = 616,
	ADRENO_REV_A630 = 630,
};

@@ -1251,6 +1252,7 @@ static inline int adreno_is_a6xx(struct adreno_device *adreno_dev)
}

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 void adreno_perfcntr_active_oob_put(

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;
+8 −5
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ static const struct adreno_vbif_data a615_gbif[] = {
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 @@ static const struct {
} 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 void a6xx_enable_64bit(struct adreno_device *adreno_dev)
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 @@ __get_rbbm_clock_cntl_on(struct adreno_device *adreno_dev)
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 0x00020222;
@@ -517,7 +519,7 @@ __get_gmu_ao_cgc_mode_cntl(struct adreno_device *adreno_dev)
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 @@ __get_gmu_ao_cgc_delay_cntl(struct adreno_device *adreno_dev)
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 @@ static void a6xx_patch_pwrup_reglist(struct adreno_device *adreno_dev)
		+ 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),
@@ -3586,6 +3588,7 @@ static const struct {
	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)
+2 −1
Original line number Diff line number Diff line
@@ -1169,7 +1169,8 @@ static size_t a6xx_snapshot_dbgc_debugbus_block(struct kgsl_device *device,

	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;