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

Commit 567daa91 authored by Thomas (Wonyoung) Yun's avatar Thomas (Wonyoung) Yun
Browse files

msm: kgsl: fix PDC offset to support a680v2



a680v2 needs different cfg and seq offset.

Change-Id: I7566f3fe8bdd5463191740db4b0a8ac08edf9a24
Signed-off-by: default avatarThomas (Wonyoung) Yun <wyun@codeaurora.org>
parent a5b60966
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1356,6 +1356,18 @@ static inline int adreno_is_a640v2(struct adreno_device *adreno_dev)
		(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 1);
}

static inline int adreno_is_a680v1(struct adreno_device *adreno_dev)
{
	return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A680) &&
		(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 0);
}

static inline int adreno_is_a680v2(struct adreno_device *adreno_dev)
{
	return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A680) &&
		(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 1);
}

/*
 * adreno_checkreg_off() - Checks the validity of a register enum
 * @adreno_dev:		Pointer to adreno device
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -86,7 +86,7 @@ static int _load_gmu_rpmh_ucode(struct kgsl_device *device)
	unsigned int cfg_offset, seq_offset;

	/* Offsets from the base PDC (if no PDC subsections in the DTSI) */
	if (adreno_is_a640v2(adreno_dev)) {
	if ((adreno_is_a640v2(adreno_dev)) || (adreno_is_a680v2(adreno_dev))) {
		cfg_offset = 0x90000;
		seq_offset = 0x290000;
	} else {