commit 0e7cfad7d267742f12052a0d43159f7e08ba5c9f Author: Stefan Dirsch Date: Tue Nov 2 17:39:41 2010 +0100 Revert "nouveau: Let the user choose the push buffer size." This reverts commit 09b1062628f2cbddb3ebae20e7b3b8a0a93acebf. diff --git a/nouveau/nouveau_channel.c b/nouveau/nouveau_channel.c index ded5424..40a0b34 100644 --- a/nouveau/nouveau_channel.c +++ b/nouveau/nouveau_channel.c @@ -28,8 +28,7 @@ int nouveau_channel_alloc(struct nouveau_device *dev, uint32_t fb_ctxdma, - uint32_t tt_ctxdma, int pushbuf_size, - struct nouveau_channel **chan) + uint32_t tt_ctxdma, struct nouveau_channel **chan) { struct nouveau_device_priv *nvdev = nouveau_device(dev); struct nouveau_channel_priv *nvchan; @@ -91,7 +90,7 @@ nouveau_channel_alloc(struct nouveau_device *dev, uint32_t fb_ctxdma, return ret; } - ret = nouveau_pushbuf_init(&nvchan->base, pushbuf_size); + ret = nouveau_pushbuf_init(&nvchan->base); if (ret) { nouveau_channel_free((void *)&nvchan); return ret; diff --git a/nouveau/nouveau_channel.h b/nouveau/nouveau_channel.h index d61a4c0..ddcf8e4 100644 --- a/nouveau/nouveau_channel.h +++ b/nouveau/nouveau_channel.h @@ -49,7 +49,7 @@ struct nouveau_channel { int nouveau_channel_alloc(struct nouveau_device *, uint32_t fb, uint32_t tt, - int pushbuf_size, struct nouveau_channel **); + struct nouveau_channel **); void nouveau_channel_free(struct nouveau_channel **); diff --git a/nouveau/nouveau_private.h b/nouveau/nouveau_private.h index 124fe87..f98864a 100644 --- a/nouveau/nouveau_private.h +++ b/nouveau/nouveau_private.h @@ -37,8 +37,8 @@ #include "nouveau_pushbuf.h" #include "nouveau_reloc.h" -#define CALPB_BUFFERS 3 - +#define CALPB_BUFFERS 4 +#define CALPB_BUFSZ 16384 struct nouveau_pushbuf_priv { uint32_t cal_suffix0; uint32_t cal_suffix1; @@ -64,7 +64,7 @@ struct nouveau_pushbuf_priv { #define nouveau_pushbuf(n) ((struct nouveau_pushbuf_priv *)(n)) int -nouveau_pushbuf_init(struct nouveau_channel *, int buf_size); +nouveau_pushbuf_init(struct nouveau_channel *); void nouveau_pushbuf_fini(struct nouveau_channel *); diff --git a/nouveau/nouveau_pushbuf.c b/nouveau/nouveau_pushbuf.c index 90836bc..28b8018 100644 --- a/nouveau/nouveau_pushbuf.c +++ b/nouveau/nouveau_pushbuf.c @@ -78,7 +78,7 @@ nouveau_pushbuf_fini_call(struct nouveau_channel *chan) } static int -nouveau_pushbuf_init_call(struct nouveau_channel *chan, int buf_size) +nouveau_pushbuf_init_call(struct nouveau_channel *chan) { struct drm_nouveau_gem_pushbuf req; struct nouveau_channel_priv *nvchan = nouveau_channel(chan); @@ -101,7 +101,7 @@ nouveau_pushbuf_init_call(struct nouveau_channel *chan, int buf_size) for (i = 0; i < CALPB_BUFFERS; i++) { ret = nouveau_bo_new(dev, flags | NOUVEAU_BO_MAP, - 0, buf_size, &nvpb->buffer[i]); + 0, CALPB_BUFSZ, &nvpb->buffer[i]); if (ret) { nouveau_pushbuf_fini_call(chan); return ret; @@ -114,13 +114,13 @@ nouveau_pushbuf_init_call(struct nouveau_channel *chan, int buf_size) } int -nouveau_pushbuf_init(struct nouveau_channel *chan, int buf_size) +nouveau_pushbuf_init(struct nouveau_channel *chan) { struct nouveau_channel_priv *nvchan = nouveau_channel(chan); struct nouveau_pushbuf_priv *nvpb = &nvchan->pb; int ret; - ret = nouveau_pushbuf_init_call(chan, buf_size); + ret = nouveau_pushbuf_init_call(chan); if (ret) return ret;