diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-01-24 05:26:40 +0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-03-13 11:08:54 +0400 |
commit | a9bc247cbbc6310d2aefe4db0a6e92defde4426b (patch) | |
tree | e1f74e78c90bb09a265c601dcffe0d263e4562db /drivers/gpu/drm/nouveau/nouveau_mem.c | |
parent | 0ce71415587b1fd56f67294ac46f860b8b679b95 (diff) | |
download | linux-a9bc247cbbc6310d2aefe4db0a6e92defde4426b.tar.xz |
drm/nouveau/pm: detect when we need dll disabled for gddr3
Fixes minor flickering on NVS295 when at perflvl 0.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_mem.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_mem.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 3d43098de25b..f0e2a439f26a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c @@ -735,6 +735,8 @@ nouveau_mem_gddr3_mr(struct drm_device *dev, u32 freq, struct nouveau_pm_memtiming *boot, struct nouveau_pm_memtiming *t) { + u8 rver, rlen, *ramcfg = nouveau_perf_ramcfg(dev, freq, &rver, &rlen); + if (len < 15) { t->drive_strength = boot->drive_strength; t->odt = boot->odt; @@ -763,9 +765,17 @@ nouveau_mem_gddr3_mr(struct drm_device *dev, u32 freq, /* CAS */ ((nv_mem_cl_lut_gddr3[e->tCL] & 0x7) << 4) | ((nv_mem_cl_lut_gddr3[e->tCL] & 0x8) >> 2); + t->mr[1] = (boot->mr[1] & 0x100f40) | t->drive_strength | (t->odt << 2) | (nv_mem_wr_lut_gddr3[e->tWR] & 0xf) << 4; + if (ramcfg && rver == 0x00) { + /* DLL enable/disable */ + t->mr[1] &= ~0x00000040; + if (ramcfg[3] & 0x08) + t->mr[1] |= 0x00000040; + } + t->mr[2] = boot->mr[2]; NV_DEBUG(dev, "(%u) MR: %08x %08x %08x", t->id, |