Loading drivers/gpu/msm/kgsl_gmu.c +5 −17 Original line number Diff line number Diff line Loading @@ -1149,7 +1149,6 @@ int gmu_probe(struct kgsl_device *device) goto error; gmu->num_gpupwrlevels = pwr->num_pwrlevels; gmu->wakeup_pwrlevel = pwr->default_pwrlevel; for (i = 0; i < gmu->num_gpupwrlevels; i++) { int j = gmu->num_gpupwrlevels - 1 - i; Loading Loading @@ -1411,11 +1410,8 @@ int gmu_start(struct kgsl_device *device) if (ret) goto error_gmu; /* Send default DCVS level */ ret = gmu_dcvs_set(gmu, pwr->default_pwrlevel, pwr->pwrlevels[pwr->default_pwrlevel].bus_freq); if (ret) goto error_gmu; /* Request default DCVS level */ kgsl_pwrctrl_pwrlevel_change(device, pwr->default_pwrlevel); msm_bus_scale_client_update_request(gmu->pcl, 0); break; Loading @@ -1435,12 +1431,7 @@ int gmu_start(struct kgsl_device *device) if (ret) goto error_gmu; ret = gmu_dcvs_set(gmu, gmu->wakeup_pwrlevel, pwr->pwrlevels[gmu->wakeup_pwrlevel].bus_freq); if (ret) goto error_gmu; gmu->wakeup_pwrlevel = pwr->default_pwrlevel; kgsl_pwrctrl_pwrlevel_change(device, pwr->default_pwrlevel); break; case KGSL_STATE_RESET: Loading @@ -1462,11 +1453,8 @@ int gmu_start(struct kgsl_device *device) goto error_gmu; /* Send DCVS level prior to reset*/ ret = gmu_dcvs_set(gmu, pwr->active_pwrlevel, pwr->pwrlevels[pwr->active_pwrlevel] .bus_freq); if (ret) goto error_gmu; kgsl_pwrctrl_pwrlevel_change(device, pwr->default_pwrlevel); ret = gpudev->oob_set(adreno_dev, OOB_CPINIT_SET_MASK, Loading drivers/gpu/msm/kgsl_gmu.h +2 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,8 @@ enum gmu_flags { GMU_BOOT_INIT_DONE = 0, GMU_CLK_ON = 1, GMU_HFI_ON = 2, GMU_FAULT = 3 GMU_FAULT = 3, GMU_DCVS_REPLAY = 4, }; /** Loading drivers/gpu/msm/kgsl_pwrctrl.c +10 −7 Original line number Diff line number Diff line Loading @@ -244,12 +244,9 @@ static int kgsl_clk_set_rate(struct kgsl_device *device, /* GMU scales GPU freq */ if (kgsl_gmu_isenabled(device)) { /* If GMU has not been started, save it */ if (!(gmu->flags & GMU_HFI_ON)) { /* In slumber the clock is off so we are done */ if (pwrlevel == (gmu->num_gpupwrlevels - 1)) return 0; gmu->wakeup_pwrlevel = pwrlevel; if (!test_bit(GMU_HFI_ON, &gmu->flags)) { /* store clock change request */ set_bit(GMU_DCVS_REPLAY, &gmu->flags); return 0; } Loading @@ -259,6 +256,8 @@ static int kgsl_clk_set_rate(struct kgsl_device *device, return -EINVAL; } ret = gmu_dcvs_set(gmu, pwrlevel, INVALID_DCVS_IDX); /* indicate actual clock change */ clear_bit(GMU_DCVS_REPLAY, &gmu->flags); } else /* Linux clock driver scales GPU freq */ ret = clk_set_rate(pwr->grp_clks[0], pl->gpu_freq); Loading Loading @@ -412,7 +411,8 @@ void kgsl_pwrctrl_pwrlevel_change(struct kgsl_device *device, */ kgsl_pwrctrl_set_thermal_cycle(pwr, new_level); if (new_level == old_level) if (new_level == old_level && !test_bit(GMU_DCVS_REPLAY, &device->gmu.flags)) return; kgsl_pwrscale_update_stats(device); Loading Loading @@ -2485,6 +2485,9 @@ static int kgsl_pwrctrl_enable(struct kgsl_device *device) static void kgsl_pwrctrl_disable(struct kgsl_device *device) { if (kgsl_gmu_isenabled(device)) { struct kgsl_pwrctrl *pwr = &device->pwrctrl; pwr->active_pwrlevel = pwr->num_pwrlevels - 1; kgsl_pwrctrl_axi(device, KGSL_PWRFLAGS_OFF); return gmu_stop(device); } Loading Loading
drivers/gpu/msm/kgsl_gmu.c +5 −17 Original line number Diff line number Diff line Loading @@ -1149,7 +1149,6 @@ int gmu_probe(struct kgsl_device *device) goto error; gmu->num_gpupwrlevels = pwr->num_pwrlevels; gmu->wakeup_pwrlevel = pwr->default_pwrlevel; for (i = 0; i < gmu->num_gpupwrlevels; i++) { int j = gmu->num_gpupwrlevels - 1 - i; Loading Loading @@ -1411,11 +1410,8 @@ int gmu_start(struct kgsl_device *device) if (ret) goto error_gmu; /* Send default DCVS level */ ret = gmu_dcvs_set(gmu, pwr->default_pwrlevel, pwr->pwrlevels[pwr->default_pwrlevel].bus_freq); if (ret) goto error_gmu; /* Request default DCVS level */ kgsl_pwrctrl_pwrlevel_change(device, pwr->default_pwrlevel); msm_bus_scale_client_update_request(gmu->pcl, 0); break; Loading @@ -1435,12 +1431,7 @@ int gmu_start(struct kgsl_device *device) if (ret) goto error_gmu; ret = gmu_dcvs_set(gmu, gmu->wakeup_pwrlevel, pwr->pwrlevels[gmu->wakeup_pwrlevel].bus_freq); if (ret) goto error_gmu; gmu->wakeup_pwrlevel = pwr->default_pwrlevel; kgsl_pwrctrl_pwrlevel_change(device, pwr->default_pwrlevel); break; case KGSL_STATE_RESET: Loading @@ -1462,11 +1453,8 @@ int gmu_start(struct kgsl_device *device) goto error_gmu; /* Send DCVS level prior to reset*/ ret = gmu_dcvs_set(gmu, pwr->active_pwrlevel, pwr->pwrlevels[pwr->active_pwrlevel] .bus_freq); if (ret) goto error_gmu; kgsl_pwrctrl_pwrlevel_change(device, pwr->default_pwrlevel); ret = gpudev->oob_set(adreno_dev, OOB_CPINIT_SET_MASK, Loading
drivers/gpu/msm/kgsl_gmu.h +2 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,8 @@ enum gmu_flags { GMU_BOOT_INIT_DONE = 0, GMU_CLK_ON = 1, GMU_HFI_ON = 2, GMU_FAULT = 3 GMU_FAULT = 3, GMU_DCVS_REPLAY = 4, }; /** Loading
drivers/gpu/msm/kgsl_pwrctrl.c +10 −7 Original line number Diff line number Diff line Loading @@ -244,12 +244,9 @@ static int kgsl_clk_set_rate(struct kgsl_device *device, /* GMU scales GPU freq */ if (kgsl_gmu_isenabled(device)) { /* If GMU has not been started, save it */ if (!(gmu->flags & GMU_HFI_ON)) { /* In slumber the clock is off so we are done */ if (pwrlevel == (gmu->num_gpupwrlevels - 1)) return 0; gmu->wakeup_pwrlevel = pwrlevel; if (!test_bit(GMU_HFI_ON, &gmu->flags)) { /* store clock change request */ set_bit(GMU_DCVS_REPLAY, &gmu->flags); return 0; } Loading @@ -259,6 +256,8 @@ static int kgsl_clk_set_rate(struct kgsl_device *device, return -EINVAL; } ret = gmu_dcvs_set(gmu, pwrlevel, INVALID_DCVS_IDX); /* indicate actual clock change */ clear_bit(GMU_DCVS_REPLAY, &gmu->flags); } else /* Linux clock driver scales GPU freq */ ret = clk_set_rate(pwr->grp_clks[0], pl->gpu_freq); Loading Loading @@ -412,7 +411,8 @@ void kgsl_pwrctrl_pwrlevel_change(struct kgsl_device *device, */ kgsl_pwrctrl_set_thermal_cycle(pwr, new_level); if (new_level == old_level) if (new_level == old_level && !test_bit(GMU_DCVS_REPLAY, &device->gmu.flags)) return; kgsl_pwrscale_update_stats(device); Loading Loading @@ -2485,6 +2485,9 @@ static int kgsl_pwrctrl_enable(struct kgsl_device *device) static void kgsl_pwrctrl_disable(struct kgsl_device *device) { if (kgsl_gmu_isenabled(device)) { struct kgsl_pwrctrl *pwr = &device->pwrctrl; pwr->active_pwrlevel = pwr->num_pwrlevels - 1; kgsl_pwrctrl_axi(device, KGSL_PWRFLAGS_OFF); return gmu_stop(device); } Loading