diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2013-05-12 21:09:59 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-05-19 23:24:08 -0400 |
commit | 9426eedb26cfe646a843295ac7f91bf866323f92 (patch) | |
tree | 2bed77d4b17588dd640806cdb710e8e69ab08014 /drivers/gpu/drm/nouveau/core | |
parent | fadb171902df5c6ba38029a9306c2b0d559987b9 (diff) |
drm/nvc0/fifo: prevent CHAN_TABLE_ERROR:CHANNEL_PENDING on fifo fini
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c index 1613193e21e6..46dfa68c47bb 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c | |||
@@ -250,9 +250,17 @@ nvc0_fifo_chan_fini(struct nouveau_object *object, bool suspend) | |||
250 | struct nvc0_fifo_priv *priv = (void *)object->engine; | 250 | struct nvc0_fifo_priv *priv = (void *)object->engine; |
251 | struct nvc0_fifo_chan *chan = (void *)object; | 251 | struct nvc0_fifo_chan *chan = (void *)object; |
252 | u32 chid = chan->base.chid; | 252 | u32 chid = chan->base.chid; |
253 | u32 mask, engine; | ||
253 | 254 | ||
254 | nv_mask(priv, 0x003004 + (chid * 8), 0x00000001, 0x00000000); | 255 | nv_mask(priv, 0x003004 + (chid * 8), 0x00000001, 0x00000000); |
255 | nvc0_fifo_playlist_update(priv); | 256 | nvc0_fifo_playlist_update(priv); |
257 | mask = nv_rd32(priv, 0x0025a4); | ||
258 | for (engine = 0; mask && engine < 16; engine++) { | ||
259 | if (!(mask & (1 << engine))) | ||
260 | continue; | ||
261 | nv_mask(priv, 0x0025a8 + (engine * 4), 0x00000000, 0x00000000); | ||
262 | mask &= ~(1 << engine); | ||
263 | } | ||
256 | nv_wr32(priv, 0x003000 + (chid * 8), 0x00000000); | 264 | nv_wr32(priv, 0x003000 + (chid * 8), 0x00000000); |
257 | 265 | ||
258 | return nouveau_fifo_channel_fini(&chan->base, suspend); | 266 | return nouveau_fifo_channel_fini(&chan->base, suspend); |