Skip to content

Commit

Permalink
drm/nv50/fb: prevent oops on chipsets without compression tags
Browse files Browse the repository at this point in the history
Unconditionally create the tagram mm, even if there's zero tags.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Oct 31, 2012
1 parent a7dbf00 commit 5cad16a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,11 @@ nv50_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
((priv->base.ram.size & 0x000000ff) << 32);

tags = nv_rd32(priv, 0x100320);
if (tags) {
ret = nouveau_mm_init(&priv->base.tags, 0, tags, 1);
if (ret)
return ret;
ret = nouveau_mm_init(&priv->base.tags, 0, tags, 1);
if (ret)
return ret;

nv_debug(priv, "%d compression tags\n", tags);
}
nv_debug(priv, "%d compression tags\n", tags);

size = (priv->base.ram.size >> 12) - rsvd_head - rsvd_tail;
switch (device->chipset) {
Expand Down

0 comments on commit 5cad16a

Please sign in to comment.