]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
drm/nv20: Don't use pushbuf calls on the original nv20.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 25 Aug 2010 10:54:53 +0000 (12:54 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 26 Aug 2010 05:12:19 +0000 (15:12 +1000)
The "return" command is buggy on the original nv20, it jumps back to
the caller address as expected, but it doesn't clear the subroutine
active bit making the subsequent pushbuf calls fail with a "stack"
overflow.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_gem.c

index a915dcdd9a493f67ffa340cdc1922dd373076c83..613f878e6d0f6a2680998d9d3136b505ddbc39fc 100644 (file)
@@ -663,7 +663,7 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
                                      push[i].length);
                }
        } else
-       if (dev_priv->card_type >= NV_20) {
+       if (dev_priv->chipset >= 0x25) {
                ret = RING_SPACE(chan, req->nr_push * 2);
                if (ret) {
                        NV_ERROR(dev, "cal_space: %d\n", ret);
@@ -738,7 +738,7 @@ out_next:
                req->suffix0 = 0x00000000;
                req->suffix1 = 0x00000000;
        } else
-       if (dev_priv->card_type >= NV_20) {
+       if (dev_priv->chipset >= 0x25) {
                req->suffix0 = 0x00020000;
                req->suffix1 = 0x00000000;
        } else {