Loading drivers/gpu/msm/kgsl_rgmu.c +8 −11 Original line number Diff line number Diff line Loading @@ -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; } /* Loading @@ -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) Loading Loading @@ -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 */ Loading Loading
drivers/gpu/msm/kgsl_rgmu.c +8 −11 Original line number Diff line number Diff line Loading @@ -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; } /* Loading @@ -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) Loading Loading @@ -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 */ Loading