[07/13] nvkm/ramgf100: Don't mandate training pattern 4

Submitted by Roy Spliet on April 10, 2017, 7:50 p.m.

Details

Message ID 20170410195050.29638-8-nouveau@spliet.org
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Nouveau

Not browsing as part of any series.

Commit Message

Roy Spliet April 10, 2017, 7:50 p.m.
It's not found on Fermi.

Signed-off-by: Roy Spliet <nouveau@spliet.org>
---
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
index 38a7e2b..eef09bf 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
@@ -556,7 +556,7 @@  gf100_ram_train_init_0(struct nvkm_ram *ram, struct gt215_ram_train *train)
 	struct nvkm_device *device = subdev->device;
 	int i, j;
 
-	if ((train->mask & 0x03d3) != 0x03d3) {
+	if ((train->mask & 0x03c3) != 0x03c3) {
 		nvkm_warn(subdev, "missing link training data\n");
 		return -EINVAL;
 	}
@@ -575,10 +575,13 @@  gf100_ram_train_init_0(struct nvkm_ram *ram, struct gt215_ram_train *train)
 		}
 	}
 
-	for (j = 0; j < 8; j += 4) {
-		for (i = 0; i < 0x100; i++) {
-			nvkm_wr32(device, 0x10f968 + j, i);
-			nvkm_wr32(device, 0x10f900 + j, train->type04.data[i]);
+	if (train->mask & 0x10) {
+		for (j = 0; j < 8; j += 4) {
+			for (i = 0; i < 0x100; i++) {
+				nvkm_wr32(device, 0x10f968 + j, i);
+				nvkm_wr32(device, 0x10f900 + j,
+						train->type04.data[i]);
+			}
 		}
 	}