summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-12-02 12:00:33 +1000
committerBen Skeggs <bskeggs@redhat.com>2014-01-23 13:38:57 +1000
commitea8b4a380d46795610d17afcdec1067b0ff5f1c3 (patch)
tree8bc0e17501e1864ee098814d0e2334840feb51e0 /drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c
parent971372eac18294ad31c137503881426b8094550b (diff)
drm/nve0/fb/gddr5: found LP3 setting
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c b/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c
index 1427ae3828d1..f2bbe9e98bda 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c
@@ -29,7 +29,7 @@ int
nouveau_gddr5_calc(struct nouveau_ram *ram, bool nuts)
{
struct nouveau_bios *bios = nouveau_bios(ram);
- int pd, lf, xd, vh, vr, vo;
+ int pd, lf, xd, vh, vr, vo, l3;
int WL, CL, WR, at[2], dt, ds;
int rq = ram->freq < 1000000; /* XXX */
@@ -41,6 +41,7 @@ nouveau_gddr5_calc(struct nouveau_ram *ram, bool nuts)
vh = (nv_ro08(bios, ram->ramcfg.data + 0x02) & 0x10) >> 4;
vr = (nv_ro08(bios, ram->ramcfg.data + 0x02) & 0x04) >> 2;
vo = nv_ro08(bios, ram->ramcfg.data + 0x06) & 0xff;
+ l3 = !(nv_ro08(bios, ram->ramcfg.data + 0x07) & 0x02);
break;
default:
return -ENOSYS;
@@ -88,8 +89,8 @@ nouveau_gddr5_calc(struct nouveau_ram *ram, bool nuts)
ram->mr[3] &= ~0x020;
ram->mr[3] |= (rq & 0x01) << 5;
- /*XXX: LP3, where's the bit? Let's hardcode to off for now */
ram->mr[5] &= ~0x004;
+ ram->mr[5] |= (l3 << 2);
if (!vo)
vo = (ram->mr[6] & 0xff0) >> 4;