Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282651
b: refs/heads/master
c: c8b9641
h: refs/heads/master
i:
  282649: ce7062f
  282647: 0673b27
v: v3
  • Loading branch information
Ben Skeggs committed Dec 21, 2011
1 parent 13aab1a commit bdb0282
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 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: eeb7a50bddb281d7beecb0ad73c9f1233e9932c2
refs/heads/master: c8b9641a9146b13d34824f99c3d22c8c0c3a06bd
21 changes: 19 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/nouveau_hwsq.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,26 @@ hwsq_fini(struct hwsq_ucode *hwsq)
}

static inline void
hwsq_unkn(struct hwsq_ucode *hwsq, u8 v0)
hwsq_usec(struct hwsq_ucode *hwsq, u8 usec)
{
*hwsq->ptr.u08++ = v0;
u32 shift = 0;
while (usec & ~3) {
usec >>= 2;
shift++;
}

*hwsq->ptr.u08++ = (shift << 2) | usec;
}

static inline void
hwsq_setf(struct hwsq_ucode *hwsq, u8 flag, int val)
{
flag += 0x80;
if (val >= 0)
flag += 0x20;
if (val >= 1)
flag += 0x20;
*hwsq->ptr.u08++ = flag;
}

static inline void
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/nv50_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ calc_mclk(struct drm_device *dev, u32 freq, struct hwsq_ucode *hwsq)
}
if (dev_priv->chipset >= 0x92)
hwsq_wr32(hwsq, 0x611200, 0x00003300); /* disable scanout */
hwsq_unkn(hwsq, 0xb0); /* disable bus access */
hwsq_setf(hwsq, 0x10, 0); /* disable bus access */
hwsq_op5f(hwsq, 0x00, 0x01); /* no idea :s */

/* prepare memory controller */
Expand All @@ -478,10 +478,10 @@ calc_mclk(struct drm_device *dev, u32 freq, struct hwsq_ucode *hwsq)
hwsq_wr32(hwsq, 0x1002d4, 0x00000001); /* precharge banks and idle */
hwsq_wr32(hwsq, 0x1002dc, 0x00000000); /* stop self refresh mode */
hwsq_wr32(hwsq, 0x100210, 0x80000000); /* restart automatic refresh */
hwsq_unkn(hwsq, 0x07); /* wait for the PLL to stabilize (12us) */
hwsq_usec(hwsq, 12); /* wait for the PLL to stabilize */

hwsq_unkn(hwsq, 0x0b); /* may be unnecessary: causes flickering */
hwsq_unkn(hwsq, 0xd0); /* enable bus access again */
hwsq_usec(hwsq, 48); /* may be unnecessary: causes flickering */
hwsq_setf(hwsq, 0x10, 1); /* enable bus access */
hwsq_op5f(hwsq, 0x00, 0x00); /* no idea, reverse of 0x00, 0x01? */
if (dev_priv->chipset >= 0x92)
hwsq_wr32(hwsq, 0x611200, 0x00003330); /* enable scanout */
Expand Down

0 comments on commit bdb0282

Please sign in to comment.