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

Commit 9edd129b authored by Shrenuj Bansal's avatar Shrenuj Bansal
Browse files

msm: kgsl: Correct the number of cmds added for cmdbatch profiling



We would allocate space for 6 cmds if cmdbatch profiling was
enabled. That number changed to 4 with the use of the
RECORD_PFP_TIMESTAMP cmd.

Change-Id: Ide92e2c84cb22775376cb753c82bc78f4900c533
Signed-off-by: default avatarShrenuj Bansal <shrenujb@codeaurora.org>
parent 7dd146b7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1285,8 +1285,10 @@ int adreno_ringbuffer_submitcmd(struct adreno_device *adreno_dev,
	 * Worst case size:
	 * 2 - start of IB identifier
	 * 6 - secure IB start
	 * 2 - cmdbatch profiling
	 * 1 - skip preamble
	 * 3 * numibs - 3 per IB
	 * 2 - cmdbatch profiling
	 * 6 - secure IB end
	 * 2 - end of IB identifier
	 */
@@ -1299,7 +1301,7 @@ int adreno_ringbuffer_submitcmd(struct adreno_device *adreno_dev,

	cmds = link = kzalloc(sizeof(unsigned int) * (numibs * 3 + 5 +
					(secured_ctxt ? 14 : 0) +
					(cmdbatch_profiling ? 6 : 0)),
					(cmdbatch_profiling ? 4 : 0)),
				GFP_KERNEL);
	if (!link) {
		ret = -ENOMEM;