summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-01-08 03:53:40 +0300
committerDave Airlie <airlied@redhat.com>2010-01-11 07:41:18 +0300
commit400f14ac4ef02b2f77c9d0e3ad7d66e2f6c8e663 (patch)
tree0b8174d1a3ed384462b2d751b31ca6a0606efd4c /drivers/gpu
parentcc6e496587502057af02139931736b0b7a49f637 (diff)
downloadlinux-400f14ac4ef02b2f77c9d0e3ad7d66e2f6c8e663.tar.xz
drm/nouveau: use dma.max rather than pushbuf size for checking GET validity
Some upcoming G80 DMA changes will depend on this, but it's split out for bisectibility just in case it causes some unexpected issues. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c
index f1fd3f2b9813..3f7f78e03d42 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dma.c
+++ b/drivers/gpu/drm/nouveau/nouveau_dma.c
@@ -130,7 +130,7 @@ READ_GET(struct nouveau_channel *chan, uint32_t *get)
val = nvchan_rd32(chan, chan->user_get);
if (val < chan->pushbuf_base ||
- val >= chan->pushbuf_base + chan->pushbuf_bo->bo.mem.size) {
+ val > chan->pushbuf_base + (chan->dma.max << 2)) {
/* meaningless to dma_wait() except to know whether the
* GPU has stalled or not
*/