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

Commit 8668b71c authored by Shubhraprakash Das's avatar Shubhraprakash Das
Browse files

msm: kgsl: Clear and set device started bit on soft reset



When device is soft reset then the started flag which indicates that
device is inactive needs to be reset and set again when the reset
completes. This prevents the code from hitting a BUG while waiting
for dispatcher to idle when the device is being reset from the
dispatcher code.

Change-Id: I669f5e110585f1a934e919a3a804684997f5d82f
Signed-off-by: default avatarShubhraprakash Das <sadas@codeaurora.org>
parent 0cd19211
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2127,6 +2127,8 @@ static int adreno_soft_reset(struct kgsl_device *device)
	kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF);

	adreno_clear_gpu_fault(adreno_dev);
	/* since device is oficially off now clear start bit */
	clear_bit(ADRENO_DEVICE_STARTED, &adreno_dev->priv);

	/* Delete the idle timer */
	del_timer_sync(&device->idle_timer);
@@ -2167,8 +2169,11 @@ static int adreno_soft_reset(struct kgsl_device *device)
	else
		ret = adreno_ringbuffer_cold_start(adreno_dev);

	if (!ret)
	if (!ret) {
		device->reset_counter++;
		/* device is back online */
		set_bit(ADRENO_DEVICE_STARTED, &adreno_dev->priv);
	}

	return ret;
}