diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_fifo.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 78662cc1c8d5..58c717247f26 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c | |||
@@ -277,7 +277,7 @@ nouveau_pci_resume(struct pci_dev *pdev) | |||
277 | 277 | ||
278 | for (i = 0; i < dev_priv->engine.fifo.channels; i++) { | 278 | for (i = 0; i < dev_priv->engine.fifo.channels; i++) { |
279 | chan = dev_priv->fifos[i]; | 279 | chan = dev_priv->fifos[i]; |
280 | if (!chan) | 280 | if (!chan || !chan->pushbuf_bo) |
281 | continue; | 281 | continue; |
282 | 282 | ||
283 | for (j = 0; j < NOUVEAU_DMA_SKIPS; j++) | 283 | for (j = 0; j < NOUVEAU_DMA_SKIPS; j++) |
diff --git a/drivers/gpu/drm/nouveau/nv50_fifo.c b/drivers/gpu/drm/nouveau/nv50_fifo.c index 77ae1aaa0bce..b7282284f080 100644 --- a/drivers/gpu/drm/nouveau/nv50_fifo.c +++ b/drivers/gpu/drm/nouveau/nv50_fifo.c | |||
@@ -416,7 +416,7 @@ nv50_fifo_unload_context(struct drm_device *dev) | |||
416 | NV_DEBUG(dev, "\n"); | 416 | NV_DEBUG(dev, "\n"); |
417 | 417 | ||
418 | chid = pfifo->channel_id(dev); | 418 | chid = pfifo->channel_id(dev); |
419 | if (chid < 0 || chid >= dev_priv->engine.fifo.channels) | 419 | if (chid < 1 || chid >= dev_priv->engine.fifo.channels - 1) |
420 | return 0; | 420 | return 0; |
421 | 421 | ||
422 | chan = dev_priv->fifos[chid]; | 422 | chan = dev_priv->fifos[chid]; |