aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-01-23 20:26:40 -0500
committerBen Skeggs <bskeggs@redhat.com>2012-03-13 03:08:54 -0400
commita9bc247cbbc6310d2aefe4db0a6e92defde4426b (patch)
treee1f74e78c90bb09a265c601dcffe0d263e4562db /drivers/gpu/drm
parent0ce71415587b1fd56f67294ac46f860b8b679b95 (diff)
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')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_mem.c10
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_perf.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_pm.h1
3 files changed, 12 insertions, 1 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,
735 struct nouveau_pm_memtiming *boot, 735 struct nouveau_pm_memtiming *boot,
736 struct nouveau_pm_memtiming *t) 736 struct nouveau_pm_memtiming *t)
737{ 737{
738 u8 rver, rlen, *ramcfg = nouveau_perf_ramcfg(dev, freq, &rver, &rlen);
739
738 if (len < 15) { 740 if (len < 15) {
739 t->drive_strength = boot->drive_strength; 741 t->drive_strength = boot->drive_strength;
740 t->odt = boot->odt; 742 t->odt = boot->odt;
@@ -763,9 +765,17 @@ nouveau_mem_gddr3_mr(struct drm_device *dev, u32 freq,
763 /* CAS */ 765 /* CAS */
764 ((nv_mem_cl_lut_gddr3[e->tCL] & 0x7) << 4) | 766 ((nv_mem_cl_lut_gddr3[e->tCL] & 0x7) << 4) |
765 ((nv_mem_cl_lut_gddr3[e->tCL] & 0x8) >> 2); 767 ((nv_mem_cl_lut_gddr3[e->tCL] & 0x8) >> 2);
768
766 t->mr[1] = (boot->mr[1] & 0x100f40) | t->drive_strength | 769 t->mr[1] = (boot->mr[1] & 0x100f40) | t->drive_strength |
767 (t->odt << 2) | 770 (t->odt << 2) |
768 (nv_mem_wr_lut_gddr3[e->tWR] & 0xf) << 4; 771 (nv_mem_wr_lut_gddr3[e->tWR] & 0xf) << 4;
772 if (ramcfg && rver == 0x00) {
773 /* DLL enable/disable */
774 t->mr[1] &= ~0x00000040;
775 if (ramcfg[3] & 0x08)
776 t->mr[1] |= 0x00000040;
777 }
778
769 t->mr[2] = boot->mr[2]; 779 t->mr[2] = boot->mr[2];
770 780
771 NV_DEBUG(dev, "(%u) MR: %08x %08x %08x", t->id, 781 NV_DEBUG(dev, "(%u) MR: %08x %08x %08x", t->id,
diff --git a/drivers/gpu/drm/nouveau/nouveau_perf.c b/drivers/gpu/drm/nouveau/nouveau_perf.c
index bd6071f10008..cc8beb8e2f06 100644
--- a/drivers/gpu/drm/nouveau/nouveau_perf.c
+++ b/drivers/gpu/drm/nouveau/nouveau_perf.c
@@ -139,7 +139,7 @@ nouveau_perf_rammap(struct drm_device *dev, u32 freq,
139 return NULL; 139 return NULL;
140} 140}
141 141
142static u8 * 142u8 *
143nouveau_perf_ramcfg(struct drm_device *dev, u32 freq, u8 *ver, u8 *len) 143nouveau_perf_ramcfg(struct drm_device *dev, u32 freq, u8 *ver, u8 *len)
144{ 144{
145 struct drm_nouveau_private *dev_priv = dev->dev_private; 145 struct drm_nouveau_private *dev_priv = dev->dev_private;
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.h b/drivers/gpu/drm/nouveau/nouveau_pm.h
index 5a61f05f49da..1a8ae15803a0 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.h
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.h
@@ -60,6 +60,7 @@ int nouveau_voltage_gpio_set(struct drm_device *, int voltage);
60void nouveau_perf_init(struct drm_device *); 60void nouveau_perf_init(struct drm_device *);
61void nouveau_perf_fini(struct drm_device *); 61void nouveau_perf_fini(struct drm_device *);
62u8 *nouveau_perf_timing(struct drm_device *, u32 freq, u8 *ver, u8 *len); 62u8 *nouveau_perf_timing(struct drm_device *, u32 freq, u8 *ver, u8 *len);
63u8 *nouveau_perf_ramcfg(struct drm_device *, u32 freq, u8 *ver, u8 *len);
63 64
64/* nouveau_mem.c */ 65/* nouveau_mem.c */
65void nouveau_mem_timing_init(struct drm_device *); 66void nouveau_mem_timing_init(struct drm_device *);