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

Commit 0bdded6f authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Directly enable the regulator after a soft reset



The power state machine doesn't get touched during a soft reset so
the code expects the state to remain exactly the same once we get
back to active.  In reality there is a minor hiccup as the SP/TP
regulator gets reset by the soft reset. That got fixed in
a316a2a6 by always calling the
regulator enable call.

Unfortunately 7631272f was soon
added and added statefulness to the regulator enable/disable pair.
Beacuse adreno_regulator_disable() is never called during the soft
reset process the state machine thinks the SP/TP is still active
and the subsequent call to the regulator_enable hook returned
silently. What we need to do is go straight to the hardware
(since we *know* that the SP/TP is turned off) and force it back
on so the state stays correct.

CRs-Fixed: 745166
Change-Id: Ic0dedbade57361e94f11001032f42ba5d20c9956
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 731efad8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -357,7 +357,7 @@ static int adreno_soft_reset(struct kgsl_device *device);
 */
void _soft_reset(struct adreno_device *adreno_dev)
{
	struct kgsl_device *device = &adreno_dev->dev;
	struct adreno_gpudev *gpudev  = ADRENO_GPU_DEVICE(adreno_dev);
	unsigned int reg;

	adreno_writereg(adreno_dev, ADRENO_REG_RBBM_SW_RESET_CMD, 1);
@@ -369,8 +369,9 @@ void _soft_reset(struct adreno_device *adreno_dev)
	adreno_writereg(adreno_dev, ADRENO_REG_RBBM_SW_RESET_CMD, 0);

	/* The SP/TP regulator gets turned off after a soft reset */
	if (device->ftbl->regulator_enable)
		device->ftbl->regulator_enable(device);

	if (gpudev->regulator_enable)
		gpudev->regulator_enable(adreno_dev);
}