Loading drivers/gpu/msm/adreno_a6xx.c +9 −8 Original line number Diff line number Diff line Loading @@ -347,24 +347,25 @@ static bool __disable_cx_regulator_wait(struct regulator *reg, } } bool a6xx_cx_regulator_disable_wait(struct regulator *reg, void a6xx_cx_regulator_disable_wait(struct regulator *reg, struct kgsl_device *device, u32 timeout) { bool ret; struct adreno_device *adreno_dev = ADRENO_DEVICE(device); if (IS_ERR_OR_NULL(reg)) return true; return; if (ADRENO_QUIRK(adreno_dev, ADRENO_QUIRK_CX_GDSC)) regulator_set_mode(reg, REGULATOR_MODE_IDLE); ret = __disable_cx_regulator_wait(reg, device, timeout); if (!__disable_cx_regulator_wait(reg, device, timeout)) { dev_err(device->dev, "GPU CX wait timeout. Dumping CX votes:\n"); /* Dump the cx regulator consumer list */ qcom_clk_dump(NULL, reg, false); } if (ADRENO_QUIRK(adreno_dev, ADRENO_QUIRK_CX_GDSC)) regulator_set_mode(reg, REGULATOR_MODE_NORMAL); return ret; } static void set_holi_sptprac_clock(struct adreno_device *adreno_dev, bool enable) Loading Loading @@ -2594,8 +2595,8 @@ static void a619_holi_regulator_disable_poll(struct kgsl_device *device) /* Remove the vote for the vdd parent supply */ kgsl_regulator_set_voltage(device->dev, pwr->gx_gdsc_parent, 0); if (!a6xx_cx_regulator_disable_wait(pwr->cx_gdsc, device, 200)) dev_err(device->dev, "Regulator vddcx is stuck on\n"); a6xx_cx_regulator_disable_wait(pwr->cx_gdsc, device, 200); } const struct adreno_gpudev adreno_a6xx_gpudev = { Loading drivers/gpu/msm/adreno_a6xx.h +1 −3 Original line number Diff line number Diff line Loading @@ -283,10 +283,8 @@ static inline bool a6xx_is_smmu_stalled(struct kgsl_device *device) * * Disable the regulator and wait @timeout milliseconds for it to enter the * disabled state. * * Return: True if the regulator was disabled or false if it timed out */ bool a6xx_cx_regulator_disable_wait(struct regulator *reg, void a6xx_cx_regulator_disable_wait(struct regulator *reg, struct kgsl_device *device, u32 timeout); /* Preemption functions */ Loading drivers/gpu/msm/adreno_a6xx_gmu.c +7 −11 Original line number Diff line number Diff line Loading @@ -1761,8 +1761,7 @@ void a6xx_gmu_suspend(struct adreno_device *adreno_dev) clk_bulk_disable_unprepare(gmu->num_clks, gmu->clks); if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading Loading @@ -2243,9 +2242,8 @@ static int a6xx_gmu_first_boot(struct adreno_device *adreno_dev) clk_bulk_disable_unprepare(gmu->num_clks, gmu->clks); gdsc_off: /* Pool to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); /* Poll to make sure that the CX is off */ a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading Loading @@ -2324,9 +2322,8 @@ static int a6xx_gmu_boot(struct adreno_device *adreno_dev) clk_bulk_disable_unprepare(gmu->num_clks, gmu->clks); gdsc_off: /* Pool to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); /* Poll to make sure that the CX is off */ a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading Loading @@ -2809,9 +2806,8 @@ static int a6xx_gmu_power_off(struct adreno_device *adreno_dev) clk_bulk_disable_unprepare(gmu->num_clks, gmu->clks); /* Pool to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); /* Poll to make sure that the CX is off */ a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading drivers/gpu/msm/adreno_a6xx_hwsched.c +3 −6 Original line number Diff line number Diff line Loading @@ -217,8 +217,7 @@ static int a6xx_hwsched_gmu_first_boot(struct adreno_device *adreno_dev) gdsc_off: /* Poll to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading Loading @@ -280,8 +279,7 @@ static int a6xx_hwsched_gmu_boot(struct adreno_device *adreno_dev) gdsc_off: /* Poll to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading Loading @@ -383,8 +381,7 @@ static int a6xx_hwsched_gmu_power_off(struct adreno_device *adreno_dev) clk_bulk_disable_unprepare(gmu->num_clks, gmu->clks); /* Poll to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading Loading
drivers/gpu/msm/adreno_a6xx.c +9 −8 Original line number Diff line number Diff line Loading @@ -347,24 +347,25 @@ static bool __disable_cx_regulator_wait(struct regulator *reg, } } bool a6xx_cx_regulator_disable_wait(struct regulator *reg, void a6xx_cx_regulator_disable_wait(struct regulator *reg, struct kgsl_device *device, u32 timeout) { bool ret; struct adreno_device *adreno_dev = ADRENO_DEVICE(device); if (IS_ERR_OR_NULL(reg)) return true; return; if (ADRENO_QUIRK(adreno_dev, ADRENO_QUIRK_CX_GDSC)) regulator_set_mode(reg, REGULATOR_MODE_IDLE); ret = __disable_cx_regulator_wait(reg, device, timeout); if (!__disable_cx_regulator_wait(reg, device, timeout)) { dev_err(device->dev, "GPU CX wait timeout. Dumping CX votes:\n"); /* Dump the cx regulator consumer list */ qcom_clk_dump(NULL, reg, false); } if (ADRENO_QUIRK(adreno_dev, ADRENO_QUIRK_CX_GDSC)) regulator_set_mode(reg, REGULATOR_MODE_NORMAL); return ret; } static void set_holi_sptprac_clock(struct adreno_device *adreno_dev, bool enable) Loading Loading @@ -2594,8 +2595,8 @@ static void a619_holi_regulator_disable_poll(struct kgsl_device *device) /* Remove the vote for the vdd parent supply */ kgsl_regulator_set_voltage(device->dev, pwr->gx_gdsc_parent, 0); if (!a6xx_cx_regulator_disable_wait(pwr->cx_gdsc, device, 200)) dev_err(device->dev, "Regulator vddcx is stuck on\n"); a6xx_cx_regulator_disable_wait(pwr->cx_gdsc, device, 200); } const struct adreno_gpudev adreno_a6xx_gpudev = { Loading
drivers/gpu/msm/adreno_a6xx.h +1 −3 Original line number Diff line number Diff line Loading @@ -283,10 +283,8 @@ static inline bool a6xx_is_smmu_stalled(struct kgsl_device *device) * * Disable the regulator and wait @timeout milliseconds for it to enter the * disabled state. * * Return: True if the regulator was disabled or false if it timed out */ bool a6xx_cx_regulator_disable_wait(struct regulator *reg, void a6xx_cx_regulator_disable_wait(struct regulator *reg, struct kgsl_device *device, u32 timeout); /* Preemption functions */ Loading
drivers/gpu/msm/adreno_a6xx_gmu.c +7 −11 Original line number Diff line number Diff line Loading @@ -1761,8 +1761,7 @@ void a6xx_gmu_suspend(struct adreno_device *adreno_dev) clk_bulk_disable_unprepare(gmu->num_clks, gmu->clks); if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading Loading @@ -2243,9 +2242,8 @@ static int a6xx_gmu_first_boot(struct adreno_device *adreno_dev) clk_bulk_disable_unprepare(gmu->num_clks, gmu->clks); gdsc_off: /* Pool to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); /* Poll to make sure that the CX is off */ a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading Loading @@ -2324,9 +2322,8 @@ static int a6xx_gmu_boot(struct adreno_device *adreno_dev) clk_bulk_disable_unprepare(gmu->num_clks, gmu->clks); gdsc_off: /* Pool to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); /* Poll to make sure that the CX is off */ a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading Loading @@ -2809,9 +2806,8 @@ static int a6xx_gmu_power_off(struct adreno_device *adreno_dev) clk_bulk_disable_unprepare(gmu->num_clks, gmu->clks); /* Pool to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); /* Poll to make sure that the CX is off */ a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading
drivers/gpu/msm/adreno_a6xx_hwsched.c +3 −6 Original line number Diff line number Diff line Loading @@ -217,8 +217,7 @@ static int a6xx_hwsched_gmu_first_boot(struct adreno_device *adreno_dev) gdsc_off: /* Poll to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading Loading @@ -280,8 +279,7 @@ static int a6xx_hwsched_gmu_boot(struct adreno_device *adreno_dev) gdsc_off: /* Poll to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading Loading @@ -383,8 +381,7 @@ static int a6xx_hwsched_gmu_power_off(struct adreno_device *adreno_dev) clk_bulk_disable_unprepare(gmu->num_clks, gmu->clks); /* Poll to make sure that the CX is off */ if (!a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000)) dev_err(&gmu->pdev->dev, "GMU CX gdsc off timeout\n"); a6xx_cx_regulator_disable_wait(gmu->cx_gdsc, device, 5000); a6xx_rdpm_cx_freq_update(gmu, 0); Loading