diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-04-12 04:51:39 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-05-15 20:49:17 -0400 |
commit | 7a5c23de36002d611609650e49ef0ebd46f5c141 (patch) | |
tree | 64a5ee9885927c945a4a9ebdf17b919bf18a891b /drivers/gpu/drm/nouveau | |
parent | fe799114e2f0de37c3ddf900d15fa5e85936deba (diff) |
drm/nvc0/fifo: kick channels off during suspend
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_fifo.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvc0_fifo.c b/drivers/gpu/drm/nouveau/nvc0_fifo.c index 55a4245c1a67..2bd0511511e4 100644 --- a/drivers/gpu/drm/nouveau/nvc0_fifo.c +++ b/drivers/gpu/drm/nouveau/nvc0_fifo.c | |||
@@ -240,6 +240,22 @@ nvc0_fifo_load_context(struct nouveau_channel *chan) | |||
240 | int | 240 | int |
241 | nvc0_fifo_unload_context(struct drm_device *dev) | 241 | nvc0_fifo_unload_context(struct drm_device *dev) |
242 | { | 242 | { |
243 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
244 | int i; | ||
245 | |||
246 | for (i = 0; i < 128; i++) { | ||
247 | if (!(nv_rd32(dev, 0x003004 + (i * 4)) & 1)) | ||
248 | continue; | ||
249 | |||
250 | nv_mask(dev, 0x003004 + (i * 4), 0x00000001, 0x00000000); | ||
251 | nv_wr32(dev, 0x002634, i); | ||
252 | if (!nv_wait(dev, 0x002634, 0xffffffff, i)) { | ||
253 | NV_INFO(dev, "PFIFO: kick ch %d failed: 0x%08x\n", | ||
254 | i, nv_rd32(dev, 0x002634)); | ||
255 | return -EBUSY; | ||
256 | } | ||
257 | } | ||
258 | |||
243 | return 0; | 259 | return 0; |
244 | } | 260 | } |
245 | 261 | ||