diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-08-12 20:22:41 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-08-16 21:59:24 -0400 |
commit | 46d4cae20038bcb2511cba0c86f0be2d11520369 (patch) | |
tree | 63e4570cffcc229e9621c45283e65df85b3bab61 /drivers | |
parent | 45a68a072ee3b7f8fbd84b946aac827cc61256b0 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_instmem.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_instmem.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c index 37c7b48ab24a..c95bf9b681dd 100644 --- a/drivers/gpu/drm/nouveau/nv50_instmem.c +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c | |||
@@ -278,7 +278,7 @@ nv50_instmem_init(struct drm_device *dev) | |||
278 | /*XXX: incorrect, but needed to make hash func "work" */ | 278 | /*XXX: incorrect, but needed to make hash func "work" */ |
279 | dev_priv->ramht_offset = 0x10000; | 279 | dev_priv->ramht_offset = 0x10000; |
280 | dev_priv->ramht_bits = 9; | 280 | dev_priv->ramht_bits = 9; |
281 | dev_priv->ramht_size = (1 << dev_priv->ramht_bits); | 281 | dev_priv->ramht_size = (1 << dev_priv->ramht_bits) * 8; |
282 | return 0; | 282 | return 0; |
283 | } | 283 | } |
284 | 284 | ||
diff --git a/drivers/gpu/drm/nouveau/nvc0_instmem.c b/drivers/gpu/drm/nouveau/nvc0_instmem.c index 3ab3cdc42173..854e0d72fc0d 100644 --- a/drivers/gpu/drm/nouveau/nvc0_instmem.c +++ b/drivers/gpu/drm/nouveau/nvc0_instmem.c | |||
@@ -221,7 +221,7 @@ nvc0_instmem_init(struct drm_device *dev) | |||
221 | /*XXX: incorrect, but needed to make hash func "work" */ | 221 | /*XXX: incorrect, but needed to make hash func "work" */ |
222 | dev_priv->ramht_offset = 0x10000; | 222 | dev_priv->ramht_offset = 0x10000; |
223 | dev_priv->ramht_bits = 9; | 223 | dev_priv->ramht_bits = 9; |
224 | dev_priv->ramht_size = (1 << dev_priv->ramht_bits); | 224 | dev_priv->ramht_size = (1 << dev_priv->ramht_bits) * 8; |
225 | return 0; | 225 | return 0; |
226 | } | 226 | } |
227 | 227 | ||