Commit d211d87e authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Dave Airlie

Revert "drm/nouveau/fifo/gk104: kick channels when deactivating them"

This reverts commit 1addc126

This commit seems to cause crashes in gk104_fifo_intr_runlist() by
returning 0xbad0da00 when register 0x2a00 is read. Since this commit was
intended for GM20B which is not completely supported yet, let's revert
it for the time being.
Reported-by: default avatarEric Biggers <ebiggers3@gmail.com>
Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Tested-by: default avatarAfzal Mohammed <afzal.mohd.ma@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 3e04e2fe
...@@ -165,31 +165,15 @@ gk104_fifo_context_attach(struct nvkm_object *parent, ...@@ -165,31 +165,15 @@ gk104_fifo_context_attach(struct nvkm_object *parent,
return 0; return 0;
} }
static int
gk104_fifo_chan_kick(struct gk104_fifo_chan *chan)
{
struct nvkm_object *obj = (void *)chan;
struct gk104_fifo_priv *priv = (void *)obj->engine;
nv_wr32(priv, 0x002634, chan->base.chid);
if (!nv_wait(priv, 0x002634, 0x100000, 0x000000)) {
nv_error(priv, "channel %d [%s] kick timeout\n",
chan->base.chid, nvkm_client_name(chan));
return -EBUSY;
}
return 0;
}
static int static int
gk104_fifo_context_detach(struct nvkm_object *parent, bool suspend, gk104_fifo_context_detach(struct nvkm_object *parent, bool suspend,
struct nvkm_object *object) struct nvkm_object *object)
{ {
struct nvkm_bar *bar = nvkm_bar(parent); struct nvkm_bar *bar = nvkm_bar(parent);
struct gk104_fifo_priv *priv = (void *)parent->engine;
struct gk104_fifo_base *base = (void *)parent->parent; struct gk104_fifo_base *base = (void *)parent->parent;
struct gk104_fifo_chan *chan = (void *)parent; struct gk104_fifo_chan *chan = (void *)parent;
u32 addr; u32 addr;
int ret;
switch (nv_engidx(object->engine)) { switch (nv_engidx(object->engine)) {
case NVDEV_ENGINE_SW : return 0; case NVDEV_ENGINE_SW : return 0;
...@@ -204,9 +188,13 @@ gk104_fifo_context_detach(struct nvkm_object *parent, bool suspend, ...@@ -204,9 +188,13 @@ gk104_fifo_context_detach(struct nvkm_object *parent, bool suspend,
return -EINVAL; return -EINVAL;
} }
ret = gk104_fifo_chan_kick(chan); nv_wr32(priv, 0x002634, chan->base.chid);
if (ret && suspend) if (!nv_wait(priv, 0x002634, 0xffffffff, chan->base.chid)) {
return ret; nv_error(priv, "channel %d [%s] kick timeout\n",
chan->base.chid, nvkm_client_name(chan));
if (suspend)
return -EBUSY;
}
if (addr) { if (addr) {
nv_wo32(base, addr + 0x00, 0x00000000); nv_wo32(base, addr + 0x00, 0x00000000);
...@@ -331,7 +319,6 @@ gk104_fifo_chan_fini(struct nvkm_object *object, bool suspend) ...@@ -331,7 +319,6 @@ gk104_fifo_chan_fini(struct nvkm_object *object, bool suspend)
gk104_fifo_runlist_update(priv, chan->engine); gk104_fifo_runlist_update(priv, chan->engine);
} }
gk104_fifo_chan_kick(chan);
nv_wr32(priv, 0x800000 + (chid * 8), 0x00000000); nv_wr32(priv, 0x800000 + (chid * 8), 0x00000000);
return nvkm_fifo_channel_fini(&chan->base, suspend); return nvkm_fifo_channel_fini(&chan->base, suspend);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment