diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/drm/nouveau/nv50_fifo.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_fifo.c b/drivers/gpu/drm/nouveau/nv50_fifo.c index 32b244bcb482..204a79ff10f4 100644 --- a/drivers/gpu/drm/nouveau/nv50_fifo.c +++ b/drivers/gpu/drm/nouveau/nv50_fifo.c | |||
| @@ -317,17 +317,20 @@ void | |||
| 317 | nv50_fifo_destroy_context(struct nouveau_channel *chan) | 317 | nv50_fifo_destroy_context(struct nouveau_channel *chan) |
| 318 | { | 318 | { |
| 319 | struct drm_device *dev = chan->dev; | 319 | struct drm_device *dev = chan->dev; |
| 320 | struct nouveau_gpuobj_ref *ramfc = chan->ramfc; | ||
| 320 | 321 | ||
| 321 | NV_DEBUG(dev, "ch%d\n", chan->id); | 322 | NV_DEBUG(dev, "ch%d\n", chan->id); |
| 322 | 323 | ||
| 323 | nouveau_gpuobj_ref_del(dev, &chan->ramfc); | 324 | /* This will ensure the channel is seen as disabled. */ |
| 324 | nouveau_gpuobj_ref_del(dev, &chan->cache); | 325 | chan->ramfc = NULL; |
| 325 | |||
| 326 | nv50_fifo_channel_disable(dev, chan->id, false); | 326 | nv50_fifo_channel_disable(dev, chan->id, false); |
| 327 | 327 | ||
| 328 | /* Dummy channel, also used on ch 127 */ | 328 | /* Dummy channel, also used on ch 127 */ |
| 329 | if (chan->id == 0) | 329 | if (chan->id == 0) |
| 330 | nv50_fifo_channel_disable(dev, 127, false); | 330 | nv50_fifo_channel_disable(dev, 127, false); |
| 331 | |||
| 332 | nouveau_gpuobj_ref_del(dev, &ramfc); | ||
| 333 | nouveau_gpuobj_ref_del(dev, &chan->cache); | ||
| 331 | } | 334 | } |
| 332 | 335 | ||
| 333 | int | 336 | int |
