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

Commit 341934ba authored by Lynus Vaz's avatar Lynus Vaz Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Use legacy PM4 check instead of adreno version



Check for legacy PM4 commands instead of adreno version to calculate
ringbuffer space for PM4 commands that write to memory.

Change-Id: I5d1d4cfbc70bc73ddee9ee752de24aae154a04dc
Signed-off-by: default avatarLynus Vaz <lvaz@codeaurora.org>
parent 26db1949
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -813,10 +813,10 @@ int adreno_ringbuffer_submitcmd(struct adreno_device *adreno_dev,
		dwords += 6;

		/*
		 * REG_TO_MEM packet on A5xx needs another ordinal.
		 * REG_TO_MEM packet on A5xx and above needs another ordinal.
		 * Add 2 more dwords since we do profiling before and after.
		 */
		if (adreno_is_a5xx(adreno_dev))
		if (!ADRENO_LEGACY_PM4(adreno_dev))
			dwords += 2;

		/*
@@ -833,7 +833,7 @@ int adreno_ringbuffer_submitcmd(struct adreno_device *adreno_dev,
	if (test_bit(CMDOBJ_PROFILE, &cmdobj->priv)) {
		kernel_profiling = true;
		dwords += 6;
		if (adreno_is_a5xx(adreno_dev))
		if (!ADRENO_LEGACY_PM4(adreno_dev))
			dwords += 2;
	}