117
117
struct drm_device *dev = chan->dev;
118
118
struct drm_nouveau_private *dev_priv = dev->dev_private;
121
122
/* remove channel from playlist, will context switch if active */
122
123
spin_lock_irqsave(&dev_priv->context_switch_lock, flags);
123
124
nv_mask(dev, 0x002600 + (chan->id * 4), 0x80000000, 0x00000000);
124
125
nv50_fifo_playlist_update(dev);
127
save = nv_mask(dev, 0x002520, 0x0000003f, 0x15);
126
129
/* tell any engines on this channel to unload their contexts */
127
130
nv_wr32(dev, 0x0032fc, chan->ramin->vinst >> 12);
128
131
if (!nv_wait_ne(dev, 0x0032fc, 0xffffffff, 0xffffffff))
129
132
NV_INFO(dev, "PFIFO: channel %d unload timeout\n", chan->id);
131
136
nv_wr32(dev, 0x002600 + (chan->id * 4), 0x00000000);
132
137
spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags);