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

Commit ecb1eab0 authored by Jordan Crouse's avatar Jordan Crouse Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Print the possible offending value on an opcode error



Snoop the internals of the CP and see the possibly invalid
opcode that triggered an opcode error.  This could be useful to
debug the situation that lead to the error.

Change-Id: Ic0dedbadb330e0764ac677c3d62cecc09464cef4
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 59a132a8
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -2307,9 +2307,22 @@ void a5xx_cp_hw_err_callback(struct adreno_device *adreno_dev, int bit)

	kgsl_regread(device, A5XX_CP_INTERRUPT_STATUS, &status1);

	if (status1 & BIT(A5XX_CP_OPCODE_ERROR))
	if (status1 & BIT(A5XX_CP_OPCODE_ERROR)) {
		unsigned int val;

		kgsl_regwrite(device, A5XX_CP_PFP_STAT_ADDR, 0);

		/*
		 * A5XX_CP_PFP_STAT_DATA is indexed, so read it twice to get the
		 * value we want
		 */
		kgsl_regread(device, A5XX_CP_PFP_STAT_DATA, &val);
		kgsl_regread(device, A5XX_CP_PFP_STAT_DATA, &val);

		KGSL_DRV_CRIT_RATELIMIT(device,
					"ringbuffer opcode error interrupt\n");
			"ringbuffer opcode error | possible opcode=0x%8.8X\n",
			val);
	}
	if (status1 & BIT(A5XX_CP_RESERVED_BIT_ERROR))
		KGSL_DRV_CRIT_RATELIMIT(device,
					"ringbuffer reserved bit error interrupt\n");