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

Commit 0bc15072 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Ignore rgmu disable GDSC error"

parents 046c10db 81e5f5f5
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)
@@ -404,7 +400,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 */