aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nva3_copy.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-05-01 16:46:28 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-05-24 16:56:08 +1000
commit5511d490da02b73c4c2144c7a2d368634caca67f (patch)
tree2883fdaf570e8741510a8d4214cbe0e5f2d264ef /drivers/gpu/drm/nouveau/nva3_copy.c
parentdrm/nv50: remove execution engine context saves on suspend (diff)
downloadlinux-dev-5511d490da02b73c4c2144c7a2d368634caca67f.tar.xz
linux-dev-5511d490da02b73c4c2144c7a2d368634caca67f.zip
drm/nv50: remove manual context unload on context destruction
PFIFO context destruction triggers this automagically now. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nva3_copy.c')
-rw-r--r--drivers/gpu/drm/nouveau/nva3_copy.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/gpu/drm/nouveau/nva3_copy.c b/drivers/gpu/drm/nouveau/nva3_copy.c
index b63ef87173a6..0387dc7f4f42 100644
--- a/drivers/gpu/drm/nouveau/nva3_copy.c
+++ b/drivers/gpu/drm/nouveau/nva3_copy.c
@@ -79,29 +79,13 @@ static void
nva3_copy_context_del(struct nouveau_channel *chan, int engine)
{
struct nouveau_gpuobj *ctx = chan->engctx[engine];
- struct drm_device *dev = chan->dev;
- u32 inst;
-
- inst = (chan->ramin->vinst >> 12);
- inst |= 0x40000000;
-
- /* disable fifo access */
- nv_wr32(dev, 0x104048, 0x00000000);
- /* mark channel as unloaded if it's currently active */
- if (nv_rd32(dev, 0x104050) == inst)
- nv_mask(dev, 0x104050, 0x40000000, 0x00000000);
- /* mark next channel as invalid if it's about to be loaded */
- if (nv_rd32(dev, 0x104054) == inst)
- nv_mask(dev, 0x104054, 0x40000000, 0x00000000);
- /* restore fifo access */
- nv_wr32(dev, 0x104048, 0x00000003);
-
- for (inst = 0xc0; inst <= 0xd4; inst += 4)
- nv_wo32(chan->ramin, inst, 0x00000000);
+ int i;
- nouveau_gpuobj_ref(NULL, &ctx);
+ for (i = 0xc0; i <= 0xd4; i += 4)
+ nv_wo32(chan->ramin, i, 0x00000000);
atomic_dec(&chan->vm->engref[engine]);
+ nouveau_gpuobj_ref(NULL, &ctx);
chan->engctx[engine] = ctx;
}