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

Commit 81e5f5f5 authored by Hareesh Gundu's avatar Hareesh Gundu Committed by Sravankumar bijili
Browse files

msm: kgsl: Ignore rgmu disable GDSC error



There is quite possible that RGMU CX GDSC disable can
timeout in slumber and later it can be disable when other
clients remove vote on it. Don’t treat this is GMU fault
in rgmu_suspend() path and avoid triggering recovery
on CX GDSC disable error.

Change-Id: I90df5d0c49f8808d9100816c6200ebd34962d701
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
Signed-off-by: default avatarSravankumar bijili <csbijil@codeaurora.org>
parent f52b5e33
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -193,20 +193,20 @@ static int rgmu_enable_clks(struct kgsl_device *device)
}

#define CX_GDSC_TIMEOUT	5000	/* ms */
static int rgmu_disable_gdsc(struct kgsl_device *device)
static void rgmu_disable_gdsc(struct kgsl_device *device)
{
	struct rgmu_device *rgmu = KGSL_RGMU_DEVICE(device);
	int ret = 0;
	unsigned long t;

	if (IS_ERR_OR_NULL(rgmu->cx_gdsc))
		return 0;
		return;

	ret = regulator_disable(rgmu->cx_gdsc);
	if (ret) {
		dev_err(&rgmu->pdev->dev,
				"Failed to disable CX gdsc:%d\n", ret);
		return ret;
		return;
	}

	/*
@@ -218,17 +218,13 @@ static int rgmu_disable_gdsc(struct kgsl_device *device)
	t = jiffies + msecs_to_jiffies(CX_GDSC_TIMEOUT);
	do {
		if (!regulator_is_enabled(rgmu->cx_gdsc))
			return 0;
			return;
		usleep_range(10, 100);

	} while (!(time_after(jiffies, t)));

	if (!regulator_is_enabled(rgmu->cx_gdsc))
		return 0;

	if (regulator_is_enabled(rgmu->cx_gdsc))
		dev_err(&rgmu->pdev->dev, "RGMU CX gdsc off timeout\n");

	return -ETIMEDOUT;
}

static int rgmu_enable_gdsc(struct rgmu_device *rgmu)
@@ -405,7 +401,8 @@ static int rgmu_suspend(struct kgsl_device *device)
		return -EINVAL;

	rgmu_disable_clks(device);
	return rgmu_disable_gdsc(device);
	rgmu_disable_gdsc(device);
	return 0;
}

/* To be called to power on both GPU and RGMU */