Skip to content

Commit

Permalink
drm/nv50-nvc0: ramht_size is meant to be in bytes, not entries
Browse files Browse the repository at this point in the history
Fixes an infinite loop that can happen in RAMHT lookup.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Aug 17, 2010
1 parent 45a68a0 commit 46d4cae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nv50_instmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ nv50_instmem_init(struct drm_device *dev)
/*XXX: incorrect, but needed to make hash func "work" */
dev_priv->ramht_offset = 0x10000;
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;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvc0_instmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ nvc0_instmem_init(struct drm_device *dev)
/*XXX: incorrect, but needed to make hash func "work" */
dev_priv->ramht_offset = 0x10000;
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;
}

Expand Down

0 comments on commit 46d4cae

Please sign in to comment.