summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/subdev/ltc/gf100.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/gf100.c
parent92a32a4722b7c85377775f5ae987c7ae0c4ed67e (diff)
downloadlinux-fe3d9c4b87bb98222a502cc585844a0b950786fb.tar.bz2
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 'drivers/gpu/drm/nouveau/core/subdev/ltc/gf100.c')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/ltc/gf100.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/ltc/gf100.c b/drivers/gpu/drm/nouveau/core/subdev/ltc/gf100.c
index b54b582e72c4..d5d65285efe5 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/ltc/gf100.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/ltc/gf100.c
@@ -98,6 +98,7 @@ static int
gf100_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);
@@ -107,6 +108,7 @@ gf100_ltc_init(struct nouveau_object *object)
nv_mask(priv, 0x17e820, 0x00100000, 0x00000000); /* INTR_EN &= ~0x10 */
nv_wr32(priv, 0x17e8d8, priv->ltc_nr);
nv_wr32(priv, 0x17e8d4, priv->tag_base);
+ nv_mask(priv, 0x17e8c0, 0x00000002, lpg128 ? 0x00000002 : 0x00000000);
return 0;
}