aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_pm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_pm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_pm.c b/drivers/gpu/drm/nouveau/nv50_pm.c
index be5704fd4a86..378ca8ca9d6a 100644
--- a/drivers/gpu/drm/nouveau/nv50_pm.c
+++ b/drivers/gpu/drm/nouveau/nv50_pm.c
@@ -363,7 +363,7 @@ struct nv50_pm_state {
363}; 363};
364 364
365static u32 365static u32
366calc_pll(struct drm_device *dev, u32 reg, struct pll_lims *pll, 366calc_pll(struct drm_device *dev, u32 reg, struct nvbios_pll *pll,
367 u32 clk, int *N1, int *M1, int *log2P) 367 u32 clk, int *N1, int *M1, int *log2P)
368{ 368{
369 struct nouveau_pll_vals coef; 369 struct nouveau_pll_vals coef;
@@ -373,7 +373,7 @@ calc_pll(struct drm_device *dev, u32 reg, struct pll_lims *pll,
373 if (ret) 373 if (ret)
374 return 0; 374 return 0;
375 375
376 pll->vco2.maxfreq = 0; 376 pll->vco2.max_freq = 0;
377 pll->refclk = read_pll_ref(dev, reg); 377 pll->refclk = read_pll_ref(dev, reg);
378 if (!pll->refclk) 378 if (!pll->refclk)
379 return 0; 379 return 0;
@@ -542,7 +542,7 @@ calc_mclk(struct drm_device *dev, struct nouveau_pm_level *perflvl,
542 .priv = info 542 .priv = info
543 }; 543 };
544 struct hwsq_ucode *hwsq = &info->mclk_hwsq; 544 struct hwsq_ucode *hwsq = &info->mclk_hwsq;
545 struct pll_lims pll; 545 struct nvbios_pll pll;
546 int N, M, P; 546 int N, M, P;
547 int ret; 547 int ret;
548 548
@@ -550,14 +550,14 @@ calc_mclk(struct drm_device *dev, struct nouveau_pm_level *perflvl,
550 info->mctrl = nv_rd32(dev, 0x004008); 550 info->mctrl = nv_rd32(dev, 0x004008);
551 info->mctrl &= ~0x81ff0200; 551 info->mctrl &= ~0x81ff0200;
552 if (clk_same(perflvl->memory, read_clk(dev, clk_src_href))) { 552 if (clk_same(perflvl->memory, read_clk(dev, clk_src_href))) {
553 info->mctrl |= 0x00000200 | (pll.log2p_bias << 19); 553 info->mctrl |= 0x00000200 | (pll.bias_p << 19);
554 } else { 554 } else {
555 ret = calc_pll(dev, 0x4008, &pll, perflvl->memory, &N, &M, &P); 555 ret = calc_pll(dev, 0x4008, &pll, perflvl->memory, &N, &M, &P);
556 if (ret == 0) 556 if (ret == 0)
557 return -EINVAL; 557 return -EINVAL;
558 558
559 info->mctrl |= 0x80000000 | (P << 22) | (P << 16); 559 info->mctrl |= 0x80000000 | (P << 22) | (P << 16);
560 info->mctrl |= pll.log2p_bias << 19; 560 info->mctrl |= pll.bias_p << 19;
561 info->mcoef = (N << 8) | M; 561 info->mcoef = (N << 8) | M;
562 } 562 }
563 563
@@ -590,7 +590,7 @@ nv50_pm_clocks_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl)
590 struct drm_nouveau_private *dev_priv = dev->dev_private; 590 struct drm_nouveau_private *dev_priv = dev->dev_private;
591 struct nv50_pm_state *info; 591 struct nv50_pm_state *info;
592 struct hwsq_ucode *hwsq; 592 struct hwsq_ucode *hwsq;
593 struct pll_lims pll; 593 struct nvbios_pll pll;
594 u32 out, mast, divs, ctrl; 594 u32 out, mast, divs, ctrl;
595 int clk, ret = -EINVAL; 595 int clk, ret = -EINVAL;
596 int N, M, P1, P2; 596 int N, M, P1, P2;