drm/nv50-nvc0: ramht_size is meant to be in bytes, not entries

Fixes an infinite loop that can happen in RAMHT lookup.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs 2010-08-13 10:22:41 +10:00
parent 45a68a072e
commit 46d4cae200
2 changed files with 2 additions and 2 deletions

View File

@ -278,7 +278,7 @@ nv50_instmem_init(struct drm_device *dev)
/*XXX: incorrect, but needed to make hash func "work" */ /*XXX: incorrect, but needed to make hash func "work" */
dev_priv->ramht_offset = 0x10000; dev_priv->ramht_offset = 0x10000;
dev_priv->ramht_bits = 9; dev_priv->ramht_bits = 9;
dev_priv->ramht_size = (1 << dev_priv->ramht_bits); dev_priv->ramht_size = (1 << dev_priv->ramht_bits) * 8;
return 0; return 0;
} }

View File

@ -221,7 +221,7 @@ nvc0_instmem_init(struct drm_device *dev)
/*XXX: incorrect, but needed to make hash func "work" */ /*XXX: incorrect, but needed to make hash func "work" */
dev_priv->ramht_offset = 0x10000; dev_priv->ramht_offset = 0x10000;
dev_priv->ramht_bits = 9; dev_priv->ramht_bits = 9;
dev_priv->ramht_size = (1 << dev_priv->ramht_bits); dev_priv->ramht_size = (1 << dev_priv->ramht_bits) * 8;
return 0; return 0;
} }