drm/gk104/ibus: increase various random timeouts
authorBen Skeggs <bskeggs@redhat.com>
Thu, 12 Jun 2014 03:32:59 +0000 (13:32 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 17 Jun 2014 04:41:40 +0000 (14:41 +1000)
Fixes (at least) PTHERM accesses timing out at higher clock speeds.

Values and registers taken from what the binary driver does.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/ibus/nve0.c

index 7120124..ebef970 100644 (file)
@@ -94,6 +94,23 @@ nve0_ibus_intr(struct nouveau_subdev *subdev)
        }
 }
 
+static int
+nve0_ibus_init(struct nouveau_object *object)
+{
+       struct nve0_ibus_priv *priv = (void *)object;
+       int ret = nouveau_ibus_init(&priv->base);
+       if (ret == 0) {
+               nv_mask(priv, 0x122318, 0x0003ffff, 0x00001000);
+               nv_mask(priv, 0x12231c, 0x0003ffff, 0x00000200);
+               nv_mask(priv, 0x122310, 0x0003ffff, 0x00000800);
+               nv_mask(priv, 0x122348, 0x0003ffff, 0x00000100);
+               nv_mask(priv, 0x1223b0, 0x0003ffff, 0x00000fff);
+               nv_mask(priv, 0x122348, 0x0003ffff, 0x00000200);
+               nv_mask(priv, 0x122358, 0x0003ffff, 0x00002880);
+       }
+       return ret;
+}
+
 static int
 nve0_ibus_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
               struct nouveau_oclass *oclass, void *data, u32 size,
@@ -117,7 +134,7 @@ nve0_ibus_oclass = {
        .ofuncs = &(struct nouveau_ofuncs) {
                .ctor = nve0_ibus_ctor,
                .dtor = _nouveau_ibus_dtor,
-               .init = _nouveau_ibus_init,
+               .init = nve0_ibus_init,
                .fini = _nouveau_ibus_fini,
        },
 };