aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-12-02 20:09:55 -0500
committerBen Skeggs <bskeggs@redhat.com>2014-01-22 22:39:02 -0500
commit1a894c069d9790d398bb27767a6cc57d3c2f3146 (patch)
treefbe12bf39257053ea0039865e18906351e39a9ba
parenta8ccbb7701d41a772d839acb3d81d7f9ac84c678 (diff)
drm/nouveau/fb/gddr5: make sure we update mr7 when we're supposed to
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c b/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c
index 16f0117e8e91..66fe959b4f74 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c
@@ -25,6 +25,14 @@
25#include <subdev/bios.h> 25#include <subdev/bios.h>
26#include "priv.h" 26#include "priv.h"
27 27
28/* binary driver only executes this path if the condition (a) is true
29 * for any configuration (combination of rammap+ramcfg+timing) that
30 * can be reached on a given card. for now, we will execute the branch
31 * unconditionally in the hope that a "false everywhere" in the bios
32 * tables doesn't actually mean "don't touch this".
33 */
34#define NOTE00(a) 1
35
28int 36int
29nouveau_gddr5_calc(struct nouveau_ram *ram, bool nuts) 37nouveau_gddr5_calc(struct nouveau_ram *ram, bool nuts)
30{ 38{
@@ -99,10 +107,11 @@ nouveau_gddr5_calc(struct nouveau_ram *ram, bool nuts)
99 ram->mr[6] |= (vo & 0xff) << 4; 107 ram->mr[6] |= (vo & 0xff) << 4;
100 ram->mr[6] |= (pd & 0x01) << 0; 108 ram->mr[6] |= (pd & 0x01) << 0;
101 109
102 if (!(ram->mr[7] & 0x100)) 110 if (NOTE00(vr)) {
103 vr = 0; /* binary driver does this.. bug? */ 111 ram->mr[7] &= ~0x300;
104 ram->mr[7] &= ~0x388; 112 ram->mr[7] |= (vr & 0x03) << 8;
105 ram->mr[7] |= (vr & 0x03) << 8; 113 }
114 ram->mr[7] &= ~0x088;
106 ram->mr[7] |= (vh & 0x01) << 7; 115 ram->mr[7] |= (vh & 0x01) << 7;
107 ram->mr[7] |= (lf & 0x01) << 3; 116 ram->mr[7] |= (lf & 0x01) << 3;
108 117