summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2015-10-28 17:54:37 +0900
committerAlexandre Courbot <acourbot@nvidia.com>2015-12-11 17:42:07 +0900
commit2267204eee713110c5c2b6f67e25b011f54069eb (patch)
tree3671dfa618eda919dffbb6c658559a9078aaeb73
parenta9d83be2efee55e4ec7fdf7abd5316efd8322415 (diff)
downloadnouveau-2267204eee713110c5c2b6f67e25b011f54069eb.tar.gz
optimize gm20b
-rw-r--r--drm/nouveau/nvkm/subdev/clk/gm20b.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drm/nouveau/nvkm/subdev/clk/gm20b.c b/drm/nouveau/nvkm/subdev/clk/gm20b.c
index 74211d166..d3a81dca6 100644
--- a/drm/nouveau/nvkm/subdev/clk/gm20b.c
+++ b/drm/nouveau/nvkm/subdev/clk/gm20b.c
@@ -862,8 +862,7 @@ _gm20b_pllg_program_na_mnp(struct gm20b_clk *clk,
struct nvkm_volt *volt = device->volt;
int cur_uv = nvkm_volt_get(volt);
int new_uv = nvkm_volt_get_voltage_by_id(volt, clk->vid);
- struct gm20b_gpcpll *last_gpcpll = &clk->last_gpcpll;
- u32 cur_rate = last_gpcpll->rate;
+ u32 cur_rate = clk->last_gpcpll.rate;
gm20b_clk_config_dvfs(clk);
@@ -871,7 +870,7 @@ _gm20b_pllg_program_na_mnp(struct gm20b_clk *clk,
* We don't have to re-program the DVFS because the voltage keeps the
* same value (and we already have the same coeffients in hardware).
*/
- if (!allow_slide || last_gpcpll->dvfs.uv == gpcpll->dvfs.uv)
+ if (!allow_slide || clk->last_gpcpll.dvfs.uv == gpcpll->dvfs.uv)
return _gm20b_pllg_program_mnp(clk, &clk->gpcpll, allow_slide);
/* Before setting coefficient to 0, switch to safe frequency first */