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

Commit 3e3bb6e7 authored by Archana Sriram's avatar Archana Sriram Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Correct the state transitions in suspend function



GPU should not be forced to SUSPEND state when it is in INIT
or NONE state as this transition is invalid.

Change-Id: Ia3d0fd131348508fe34c57f271c1f991a98afa19
Signed-off-by: default avatarArchana Sriram <apsrir@codeaurora.org>
parent 0773fb50
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2785,7 +2785,7 @@ static int _suspend(struct kgsl_device *device)
	if ((device->state == KGSL_STATE_NONE) ||
			(device->state == KGSL_STATE_INIT) ||
			(device->state == KGSL_STATE_SUSPEND))
		goto done;
		return ret;

	/* drain to prevent from more commands being submitted */
	device->ftbl->drain(device);
@@ -2802,7 +2802,6 @@ static int _suspend(struct kgsl_device *device)
	if (ret)
		goto err;

done:
	kgsl_pwrctrl_set_state(device, KGSL_STATE_SUSPEND);
	return ret;