884f5d7
From 217215041b9285af2193a755b56a8f3ed408bfe2 Mon Sep 17 00:00:00 2001
884f5d7
From: Ben Skeggs <bskeggs@redhat.com>
884f5d7
Date: Wed, 6 Jul 2016 06:50:36 +1000
884f5d7
Subject: [PATCH] drm/nouveau/disp/sor/gf119: select correct sor when poking
884f5d7
 training pattern
884f5d7
884f5d7
Fixes a regression caused by a stupid thinko from "disp/sor/gf119: both
884f5d7
links use the same training register".
884f5d7
884f5d7
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
884f5d7
Cc: stable@vger.kernel.org
884f5d7
---
884f5d7
 drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 3 ++-
884f5d7
 1 file changed, 2 insertions(+), 1 deletion(-)
884f5d7
884f5d7
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c
884f5d7
index 22706c0..49bd5da 100644
884f5d7
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c
884f5d7
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c
884f5d7
@@ -40,7 +40,8 @@ static int
884f5d7
 gf119_sor_dp_pattern(struct nvkm_output_dp *outp, int pattern)
884f5d7
 {
884f5d7
 	struct nvkm_device *device = outp->base.disp->engine.subdev.device;
884f5d7
-	nvkm_mask(device, 0x61c110, 0x0f0f0f0f, 0x01010101 * pattern);
884f5d7
+	const u32 soff = gf119_sor_soff(outp);
884f5d7
+	nvkm_mask(device, 0x61c110 + soff, 0x0f0f0f0f, 0x01010101 * pattern);
884f5d7
 	return 0;
884f5d7
 }
884f5d7