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

Commit 69f65653 authored by Rajesh Kemisetti's avatar Rajesh Kemisetti
Browse files

msm: kgsl: Stop fault_timer before reading fault registers



Currently adreno_ft_regs_val is getting updated at the time of
first submission or on the expiry of fault_timer.

If the fault_timer expires exactly at the time of inflight becomes 0
and there is an immediate submission for which GPU finishes the work
within short time. Then there is a chance to read the fault registers
in fault_detect_read() and fault_detect_read_compare() with less
time gap and declare it as a fault.

Stop the timer before reading fault registers and start it again.

CRs-Fixed: 997250
Change-Id: Ib35104adf7b3618f94c6adf7fab531abffea3f76
Signed-off-by: default avatarRajesh Kemisetti <rajeshk@codeaurora.org>
parent c8a944be
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -576,8 +576,15 @@ static int sendcmd(struct adreno_device *adreno_dev,

	if (dispatcher->inflight == 1) {
		if (ret == 0) {

			/* Stop fault timer before reading fault registers */
			del_timer_sync(&dispatcher->fault_timer);

			fault_detect_read(adreno_dev);

			/* Start the fault timer on first submission */
			start_fault_timer(adreno_dev);

			if (!test_and_set_bit(ADRENO_DISPATCHER_ACTIVE,
				&dispatcher->priv))
				reinit_completion(&dispatcher->idle_gate);
@@ -637,9 +644,6 @@ static int sendcmd(struct adreno_device *adreno_dev,
		mod_timer(&dispatcher->timer, cmdbatch->expires);
	}

	/* Start the fault detection timer on the first submission */
	if (dispatcher->inflight == 1)
		start_fault_timer(adreno_dev);

	/*
	 * we just submitted something, readjust ringbuffer