aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv40_fifo.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-09-01 01:24:35 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-09-24 02:23:22 -0400
commite05c5a317efb03854950a3fcc5c9501bfefc7d68 (patch)
tree188a3d497848cd383e69734a17e4d76f7939056f /drivers/gpu/drm/nouveau/nv40_fifo.c
parentfbd2895e45aebdb3d3ea73a3a796cf3bb9c912da (diff)
drm/nouveau: tidy ram{ht,fc,ro} a bit
Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv40_fifo.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv40_fifo.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nv40_fifo.c b/drivers/gpu/drm/nouveau/nv40_fifo.c
index 03f4dc13725b..d337b8b28cdd 100644
--- a/drivers/gpu/drm/nouveau/nv40_fifo.c
+++ b/drivers/gpu/drm/nouveau/nv40_fifo.c
@@ -27,8 +27,9 @@
27#include "drmP.h" 27#include "drmP.h"
28#include "nouveau_drv.h" 28#include "nouveau_drv.h"
29#include "nouveau_drm.h" 29#include "nouveau_drm.h"
30#include "nouveau_ramht.h"
30 31
31#define NV40_RAMFC(c) (dev_priv->ramfc_offset + ((c) * NV40_RAMFC__SIZE)) 32#define NV40_RAMFC(c) (dev_priv->ramfc->pinst + ((c) * NV40_RAMFC__SIZE))
32#define NV40_RAMFC__SIZE 128 33#define NV40_RAMFC__SIZE 128
33 34
34int 35int
@@ -240,9 +241,9 @@ nv40_fifo_init_ramxx(struct drm_device *dev)
240 struct drm_nouveau_private *dev_priv = dev->dev_private; 241 struct drm_nouveau_private *dev_priv = dev->dev_private;
241 242
242 nv_wr32(dev, NV03_PFIFO_RAMHT, (0x03 << 24) /* search 128 */ | 243 nv_wr32(dev, NV03_PFIFO_RAMHT, (0x03 << 24) /* search 128 */ |
243 ((dev_priv->ramht_bits - 9) << 16) | 244 ((dev_priv->ramht->bits - 9) << 16) |
244 (dev_priv->ramht_offset >> 8)); 245 (dev_priv->ramht->gpuobj->pinst >> 8));
245 nv_wr32(dev, NV03_PFIFO_RAMRO, dev_priv->ramro_offset>>8); 246 nv_wr32(dev, NV03_PFIFO_RAMRO, dev_priv->ramro->pinst >> 8);
246 247
247 switch (dev_priv->chipset) { 248 switch (dev_priv->chipset) {
248 case 0x47: 249 case 0x47:
@@ -270,7 +271,7 @@ nv40_fifo_init_ramxx(struct drm_device *dev)
270 nv_wr32(dev, 0x2230, 0); 271 nv_wr32(dev, 0x2230, 0);
271 nv_wr32(dev, NV40_PFIFO_RAMFC, 272 nv_wr32(dev, NV40_PFIFO_RAMFC,
272 ((dev_priv->vram_size - 512 * 1024 + 273 ((dev_priv->vram_size - 512 * 1024 +
273 dev_priv->ramfc_offset) >> 16) | (3 << 16)); 274 dev_priv->ramfc->pinst) >> 16) | (3 << 16));
274 break; 275 break;
275 } 276 }
276} 277}