fixup fifo size so it is page aligned

main
Dave Airlie 2006-11-06 11:42:15 +11:00
parent 5e55594061
commit 2dd3c039fd
2 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ static int nouveau_dma_init(struct drm_device *dev)
drm_nouveau_private_t *dev_priv = dev->dev_private; drm_nouveau_private_t *dev_priv = dev->dev_private;
struct nouveau_config *config = &dev_priv->config; struct nouveau_config *config = &dev_priv->config;
struct mem_block *cb; 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 */ /* XXX this should be done earlier on init */
nouveau_hash_table_init(dev); nouveau_hash_table_init(dev);

View File

@ -38,7 +38,7 @@
#define NV_DMA_TARGET_VIDMEM 0 #define NV_DMA_TARGET_VIDMEM 0
#define NV_DMA_TARGET_AGP 3 #define NV_DMA_TARGET_AGP 3
#define NV03_FIFO_SIZE 0x8000 #define NV03_FIFO_SIZE 0x8000UL
#define NV_MAX_FIFO_NUMBER 32 #define NV_MAX_FIFO_NUMBER 32
#define NV03_FIFO_REGS_SIZE 0x10000 #define NV03_FIFO_REGS_SIZE 0x10000
#define NV03_FIFO_REGS(i) (0x00800000+i*NV03_FIFO_REGS_SIZE) #define NV03_FIFO_REGS(i) (0x00800000+i*NV03_FIFO_REGS_SIZE)