aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/subdev/ltc/gm107.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-09-20 17:39:00 +1000
committerDave Airlie <airlied@redhat.com>2014-09-20 17:42:25 +1000
commitfe3d9c4b87bb98222a502cc585844a0b950786fb (patch)
tree97d108065398a21e53af28a39c956a03e46baa13 /drivers/gpu/drm/nouveau/core/subdev/ltc/gm107.c
parentMerge branch 'drm-fixes-3.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes (diff)
downloadlinux-dev-fe3d9c4b87bb98222a502cc585844a0b950786fb.tar.xz
linux-dev-fe3d9c4b87bb98222a502cc585844a0b950786fb.zip
drm/nouveau: ltc/gf100-: fix cbc issues on certain boards
A mismatch between FB and LTC's idea of how big a large page is causes issues such as black "holes" in rendering to occur on some boards (those where LTC is configured for 64KiB large pages) when compression is used. Confirmed to fix at least the GK107 MBP. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/ltc/gm107.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/ltc/gm107.c b/drivers/gpu/drm/nouveau/core/subdev/ltc/gm107.c
index 4761b2e9af00..a4de64289762 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/ltc/gm107.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/ltc/gm107.c
@@ -98,6 +98,7 @@ static int
gm107_ltc_init(struct nouveau_object *object)
{
struct nvkm_ltc_priv *priv = (void *)object;
+ u32 lpg128 = !(nv_rd32(priv, 0x100c80) & 0x00000001);
int ret;
ret = nvkm_ltc_init(priv);
@@ -106,6 +107,7 @@ gm107_ltc_init(struct nouveau_object *object)
nv_wr32(priv, 0x17e27c, priv->ltc_nr);
nv_wr32(priv, 0x17e278, priv->tag_base);
+ nv_mask(priv, 0x17e264, 0x00000002, lpg128 ? 0x00000002 : 0x00000000);
return 0;
}