summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_drv.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-10-06 16:16:59 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-12-03 15:05:18 +1000
commitcff5c1332486ced8ff4180e957e04983cb72a39e (patch)
treeec1f6687156277632aef96693c1b8eca0c022b7c /drivers/gpu/drm/nouveau/nouveau_drv.c
parent6a6b73f254123851f7f73ab5e57344a569d6a0ab (diff)
downloadlinux-cff5c1332486ced8ff4180e957e04983cb72a39e.tar.gz
linux-cff5c1332486ced8ff4180e957e04983cb72a39e.tar.xz
linux-cff5c1332486ced8ff4180e957e04983cb72a39e.zip
drm/nouveau: add more fine-grained locking to channel list + structures
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
index 90875494a65a..f139aa2cbe5c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -195,9 +195,8 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
for (i = 0; i < pfifo->channels; i++) {
struct nouveau_fence *fence = NULL;
- chan = dev_priv->fifos[i];
- if (!chan || (dev_priv->card_type >= NV_50 &&
- chan == dev_priv->fifos[0]))
+ chan = dev_priv->channels.ptr[i];
+ if (!chan || !chan->pushbuf_bo)
continue;
ret = nouveau_fence_new(chan, &fence, true);
@@ -313,7 +312,7 @@ nouveau_pci_resume(struct pci_dev *pdev)
int j;
for (i = 0; i < dev_priv->engine.fifo.channels; i++) {
- chan = dev_priv->fifos[i];
+ chan = dev_priv->channels.ptr[i];
if (!chan || !chan->pushbuf_bo)
continue;