Skip to content

Commit

Permalink
drm/nv50: output calculated crtc pll when debugging on
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed May 19, 2010
1 parent 4c389f0 commit 17b96cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/nouveau/nv50_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,19 @@ nv50_crtc_set_clock(struct drm_device *dev, int head, int pclk)
return ret;

if (limits.vco2.maxfreq) {
NV_DEBUG(dev, "pclk %d out %d NM1 %d %d NM2 %d %d P %d\n",
pclk, ret, pll.N1, pll.M1, pll.N2, pll.M2, pll.log2P);

reg1 = nv_rd32(dev, pll_reg + 4) & 0xff00ff00;
reg2 = nv_rd32(dev, pll_reg + 8) & 0x8000ff00;
nv_wr32(dev, pll_reg, 0x10000611);
nv_wr32(dev, pll_reg + 4, reg1 | (pll.M1 << 16) | pll.N1);
nv_wr32(dev, pll_reg + 8,
reg2 | (pll.log2P << 28) | (pll.M2 << 16) | pll.N2);
} else {
NV_DEBUG(dev, "pclk %d out %d NM %d %d P %d\n",
pclk, ret, pll.N1, pll.M1, pll.log2P);

reg1 = nv_rd32(dev, pll_reg + 4) & 0xffc00000;
nv_wr32(dev, pll_reg, 0x50000610);
nv_wr32(dev, pll_reg + 4, reg1 |
Expand Down

0 comments on commit 17b96cc

Please sign in to comment.