]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/nouveau/devinit/gf100: make the force-post condition more obvious
authorBen Skeggs <bskeggs@redhat.com>
Thu, 21 May 2015 05:44:15 +0000 (15:44 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 29 May 2015 00:59:32 +0000 (10:59 +1000)
And also more generic, so it can be used on newer chipsets.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c

index e8778c67578ee41bcc490eca56b544137ea1ef53..9f09037731fc011cdede9a9433d8d9089afd576b 100644 (file)
@@ -95,7 +95,9 @@ gf100_devinit_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
                   struct nvkm_oclass *oclass, void *data, u32 size,
                   struct nvkm_object **pobject)
 {
+       struct nvkm_devinit_impl *impl = (void *)oclass;
        struct nv50_devinit_priv *priv;
+       u64 disable;
        int ret;
 
        ret = nvkm_devinit_create(parent, engine, oclass, &priv);
@@ -103,7 +105,8 @@ gf100_devinit_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
        if (ret)
                return ret;
 
-       if (nv_rd32(priv, 0x022500) & 0x00000001)
+       disable = impl->disable(&priv->base);
+       if (disable & (1ULL << NVDEV_ENGINE_DISP))
                priv->base.post = true;
 
        return 0;