drm/nouveau/pm: fix dll off -> dll on transitions
authorBen Skeggs <bskeggs@redhat.com>
Tue, 24 Jan 2012 03:39:56 +0000 (13:39 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 13 Mar 2012 07:09:00 +0000 (17:09 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
drivers/gpu/drm/nouveau/nouveau_mem.c

index f0e2a439f26a7162344fdaf2b59c6d23188edfca..e4ba4abca31a345f88a6737e8dbcc8204f5fd828 100644 (file)
@@ -1016,7 +1016,8 @@ nouveau_mem_exec(struct nouveau_mem_exec_func *exec,
        }
 
        if (mr[1] != info->mr[1]) {
-               exec->mrs (exec, 1, info->mr[1]);
+               /* need to keep DLL off until later, at least on GDDR3 */
+               exec->mrs (exec, 1, info->mr[1] | (mr[1] & mr1_dlloff));
                exec->wait(exec, tMRD);
        }
 
@@ -1028,8 +1029,12 @@ nouveau_mem_exec(struct nouveau_mem_exec_func *exec,
        /* update PFB timing registers */
        exec->timing_set(exec);
 
-       /* DLL reset */
+       /* DLL (enable + ) reset */
        if (!(info->mr[1] & mr1_dlloff)) {
+               if (mr[1] & mr1_dlloff) {
+                       exec->mrs (exec, 1, info->mr[1]);
+                       exec->wait(exec, tMRD);
+               }
                exec->mrs (exec, 0, info->mr[0] | 0x00000100);
                exec->wait(exec, tMRD);
                exec->mrs (exec, 0, info->mr[0] | 0x00000000);