diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-08-05 01:29:10 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-03 03:13:00 (GMT) |
commit | b10f20d590aa040e4028c04a70a27b9ad6650ba8 (patch) | |
tree | dadda877d9850bcf67a17057e4c7ac5b02e2db2a /drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c | |
parent | 5999933f4de7de7bcaae4be87667b0cff57d6e45 (diff) | |
download | linux-fsl-qoriq-b10f20d590aa040e4028c04a70a27b9ad6650ba8.tar.xz |
drm/nvc0-/gr: remove reset-after-grctx-construction hack
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c index c12e766..0b7951a 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c @@ -151,29 +151,16 @@ nvc0_grctx_fini(struct nvc0_grctx *info) struct nvc0_graph_priv *priv = info->priv; int i; - if (priv->firmware) { - nv_wr32(priv, 0x409840, 0x00000003); - nv_wr32(priv, 0x409500, 0x80000000 | info->chan->addr >> 12); - nv_wr32(priv, 0x409504, 0x00000009); - if (!nv_wait(priv, 0x409800, 0x00000001, 0x00000000)) { - nv_error(priv, "unload_ctx timeout\n"); - return -EBUSY; - } - - goto save; - } - - /* HUB_FUC(CTX_SAVE) */ - nv_wr32(priv, 0x409840, 0x80000000); - nv_wr32(priv, 0x409500, 0x80000000 | info->chan->addr >> 12); - nv_wr32(priv, 0x409504, 0x00000002); - if (!nv_wait(priv, 0x409800, 0x80000000, 0x80000000)) { - nv_error(priv, "HUB_CTX_SAVE timeout\n"); - nvc0_graph_ctxctl_debug(priv); + /* trigger a context unload by unsetting the "next channel valid" bit + * and faking a context switch interrupt + */ + nv_mask(priv, 0x409b04, 0x80000000, 0x00000000); + nv_wr32(priv, 0x409000, 0x00000100); + if (!nv_wait(priv, 0x409b00, 0x80000000, 0x00000000)) { + nv_error(priv, "grctx template channel unload timeout\n"); return -EBUSY; } -save: priv->data = kmalloc(priv->size, GFP_KERNEL); if (priv->data) { for (i = 0; i < priv->size; i += 4) |