diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-05-01 02:46:28 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-05-24 02:56:08 -0400 |
commit | 5511d490da02b73c4c2144c7a2d368634caca67f (patch) | |
tree | 2883fdaf570e8741510a8d4214cbe0e5f2d264ef /drivers/gpu/drm/nouveau/nv50_mpeg.c | |
parent | 7f2062e9de357e4158645b72b472ccba229cb3aa (diff) |
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/nv50_mpeg.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_mpeg.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_mpeg.c b/drivers/gpu/drm/nouveau/nv50_mpeg.c index 95c3305b54c6..90e8ed22cfcb 100644 --- a/drivers/gpu/drm/nouveau/nv50_mpeg.c +++ b/drivers/gpu/drm/nouveau/nv50_mpeg.c | |||
@@ -77,27 +77,13 @@ nv50_mpeg_context_new(struct nouveau_channel *chan, int engine) | |||
77 | static void | 77 | static void |
78 | nv50_mpeg_context_del(struct nouveau_channel *chan, int engine) | 78 | nv50_mpeg_context_del(struct nouveau_channel *chan, int engine) |
79 | { | 79 | { |
80 | struct drm_nouveau_private *dev_priv = chan->dev->dev_private; | ||
81 | struct nouveau_gpuobj *ctx = chan->engctx[engine]; | 80 | struct nouveau_gpuobj *ctx = chan->engctx[engine]; |
82 | struct drm_device *dev = chan->dev; | 81 | struct drm_device *dev = chan->dev; |
83 | unsigned long flags; | 82 | int i; |
84 | u32 inst, i; | ||
85 | |||
86 | if (!chan->ramin) | ||
87 | return; | ||
88 | |||
89 | inst = chan->ramin->vinst >> 12; | ||
90 | inst |= 0x80000000; | ||
91 | |||
92 | spin_lock_irqsave(&dev_priv->context_switch_lock, flags); | ||
93 | nv_mask(dev, 0x00b32c, 0x00000001, 0x00000000); | ||
94 | if (nv_rd32(dev, 0x00b318) == inst) | ||
95 | nv_mask(dev, 0x00b318, 0x80000000, 0x00000000); | ||
96 | nv_mask(dev, 0x00b32c, 0x00000001, 0x00000001); | ||
97 | spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); | ||
98 | 83 | ||
99 | for (i = 0x00; i <= 0x14; i += 4) | 84 | for (i = 0x00; i <= 0x14; i += 4) |
100 | nv_wo32(chan->ramin, CTX_PTR(dev, i), 0x00000000); | 85 | nv_wo32(chan->ramin, CTX_PTR(dev, i), 0x00000000); |
86 | |||
101 | nouveau_gpuobj_ref(NULL, &ctx); | 87 | nouveau_gpuobj_ref(NULL, &ctx); |
102 | chan->engctx[engine] = NULL; | 88 | chan->engctx[engine] = NULL; |
103 | } | 89 | } |