summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-05-21 15:44:15 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-05-29 10:56:29 +1000
commit660c79568bd8885b28ca02153f4b4602476f8d24 (patch)
treefdd21e324df70b2f93f6e0f2ab5fb6b2843de746
parent910d35ba785ccb1dc27d90e0d6ede5f9419df2de (diff)
downloadnouveau-660c79568bd8885b28ca02153f4b4602476f8d24.tar.gz
devinit/gf100: make the force-post condition more obvious
And also more generic, so it can be used on newer chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/gf100.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drm/nouveau/nvkm/subdev/devinit/gf100.c b/drm/nouveau/nvkm/subdev/devinit/gf100.c
index e8778c675..9f0903773 100644
--- a/drm/nouveau/nvkm/subdev/devinit/gf100.c
+++ b/drm/nouveau/nvkm/subdev/devinit/gf100.c
@@ -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;