Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269690
b: refs/heads/master
c: 8ce51fc
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Sep 20, 2011
1 parent 4f2f166 commit 2f268d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59ef9742f6b24d1f3062b975ec959512519f8987
refs/heads/master: 8ce51fcfee2355cc38ea6fd3062d94bb38dfbaf0
8 changes: 6 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/nvc0_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ read_vco(struct drm_device *dev, u32 dsrc)
static u32
read_pll(struct drm_device *dev, u32 pll)
{
u32 ctrl = nv_rd32(dev, pll + 0);
u32 coef = nv_rd32(dev, pll + 4);
u32 P = (coef & 0x003f0000) >> 16;
u32 N = (coef & 0x0000ff00) >> 8;
u32 M = (coef & 0x000000ff) >> 0;
u32 sclk, doff;

if (!(ctrl & 0x00000001))
return 0;

switch (pll & 0xfff000) {
case 0x00e000:
sclk = 27000;
Expand Down Expand Up @@ -91,12 +95,12 @@ read_div(struct drm_device *dev, int doff, u32 dsrc, u32 dctl)
return 100000;
case 3:
if (sctl & 0x80000000) {
u32 sclk = read_vco(dev, dsrc);
u32 sclk = read_vco(dev, dsrc + (doff * 4));
u32 sdiv = (sctl & 0x0000003f) + 2;
return (sclk * 2) / sdiv;
}

return read_vco(dev, dsrc);
return read_vco(dev, dsrc + (doff * 4));
default:
return 0;
}
Expand Down

0 comments on commit 2f268d9

Please sign in to comment.