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: Hareesh Gundu <hareeshg@codeaurora.org>
tirimbino
Hareesh Gundu 6 years ago
parent 1f169742af
commit 3fc58d895d
  1. 19
      drivers/gpu/msm/kgsl_rgmu.c

@ -200,20 +200,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;
}
/*
@ -225,17 +225,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;
dev_err(&rgmu->pdev->dev, "RGMU CX gdsc off timeout\n");
return -ETIMEDOUT;
if (regulator_is_enabled(rgmu->cx_gdsc))
dev_err(&rgmu->pdev->dev, "RGMU CX gdsc off timeout\n");
}
static int rgmu_enable_gdsc(struct rgmu_device *rgmu)
@ -413,7 +409,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 */

Loading…
Cancel
Save