summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@ppcg5.localdomain>2006-11-06 11:42:15 +1100
committerDave Airlie <airlied@ppcg5.localdomain>2006-11-06 11:42:15 +1100
commit2dd3c039fdbe86db4043abcc69babf768edb3ab8 (patch)
tree5414a2a34ce27548136fa3c99d09d660f9f31105
parent5e55594061b24521551c45838fbe6c3df57050d1 (diff)
fixup fifo size so it is page aligned
-rw-r--r--shared-core/nouveau_fifo.c2
-rw-r--r--shared-core/nouveau_reg.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/shared-core/nouveau_fifo.c b/shared-core/nouveau_fifo.c
index 5c328668..cf389647 100644
--- a/shared-core/nouveau_fifo.c
+++ b/shared-core/nouveau_fifo.c
@@ -138,7 +138,7 @@ static int nouveau_dma_init(struct drm_device *dev)
drm_nouveau_private_t *dev_priv = dev->dev_private;
struct nouveau_config *config = &dev_priv->config;
struct mem_block *cb;
- int cb_min_size = nouveau_fifo_number(dev) * NV03_FIFO_SIZE;
+ int cb_min_size = nouveau_fifo_number(dev) * max(NV03_FIFO_SIZE,PAGE_SIZE);
/* XXX this should be done earlier on init */
nouveau_hash_table_init(dev);
diff --git a/shared-core/nouveau_reg.h b/shared-core/nouveau_reg.h
index f15b621c..868a0678 100644
--- a/shared-core/nouveau_reg.h
+++ b/shared-core/nouveau_reg.h
@@ -38,7 +38,7 @@
#define NV_DMA_TARGET_VIDMEM 0
#define NV_DMA_TARGET_AGP 3
-#define NV03_FIFO_SIZE 0x8000
+#define NV03_FIFO_SIZE 0x8000UL
#define NV_MAX_FIFO_NUMBER 32
#define NV03_FIFO_REGS_SIZE 0x10000
#define NV03_FIFO_REGS(i) (0x00800000+i*NV03_FIFO_REGS_SIZE)