diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-01-26 22:26:52 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-05-24 02:31:18 -0400 |
commit | 30e533900ea74a3499dad5c4660ebaf80b50d152 (patch) | |
tree | ecacddf07fc3e3df6ab19960a5e2f293ef90d1c1 | |
parent | 27740383dde9e1f309a74cf39d96f3223dbf281c (diff) |
drm/nva3/pm: more random unknown PFB regs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nva3_pm.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nva3_pm.c b/drivers/gpu/drm/nouveau/nva3_pm.c index 86d0de084784..98588292c802 100644 --- a/drivers/gpu/drm/nouveau/nva3_pm.c +++ b/drivers/gpu/drm/nouveau/nva3_pm.c | |||
@@ -393,12 +393,34 @@ mclk_clock_set(struct nouveau_mem_exec_func *exec) | |||
393 | static void | 393 | static void |
394 | mclk_timing_set(struct nouveau_mem_exec_func *exec) | 394 | mclk_timing_set(struct nouveau_mem_exec_func *exec) |
395 | { | 395 | { |
396 | struct drm_device *dev = exec->dev; | ||
396 | struct nva3_pm_state *info = exec->priv; | 397 | struct nva3_pm_state *info = exec->priv; |
397 | struct nouveau_pm_level *perflvl = info->perflvl; | 398 | struct nouveau_pm_level *perflvl = info->perflvl; |
399 | u8 *ramcfg, ver, len; | ||
398 | int i; | 400 | int i; |
399 | 401 | ||
400 | for (i = 0; i < 9; i++) | 402 | for (i = 0; i < 9; i++) |
401 | nv_wr32(exec->dev, 0x100220 + (i * 4), perflvl->timing.reg[i]); | 403 | nv_wr32(dev, 0x100220 + (i * 4), perflvl->timing.reg[i]); |
404 | |||
405 | ramcfg = nouveau_perf_ramcfg(dev, perflvl->memory, &ver, &len); | ||
406 | if (ramcfg) { | ||
407 | u32 unk714 = nv_rd32(dev, 0x100714) & ~0xf0000010; | ||
408 | u32 unk718 = nv_rd32(dev, 0x100718) & ~0x00000100; | ||
409 | u32 unk71c = nv_rd32(dev, 0x10071c) & ~0x00000100; | ||
410 | if ( (ramcfg[2] & 0x20)) | ||
411 | unk714 |= 0xf0000000; | ||
412 | if (!(ramcfg[2] & 0x04)) | ||
413 | unk714 |= 0x00000010; | ||
414 | nv_wr32(dev, 0x100714, unk714); | ||
415 | |||
416 | if (ramcfg[2] & 0x01) | ||
417 | unk71c |= 0x00000100; | ||
418 | nv_wr32(dev, 0x10071c, unk71c); | ||
419 | |||
420 | if (ramcfg[2] & 0x02) | ||
421 | unk718 |= 0x00000100; | ||
422 | nv_wr32(dev, 0x100718, unk718); | ||
423 | } | ||
402 | } | 424 | } |
403 | 425 | ||
404 | static void | 426 | static void |