From: Ben Skeggs Date: Wed, 31 Oct 2012 00:51:00 +0000 (+1000) Subject: drm/nv50/fb: prevent oops on chipsets without compression tags X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5cad16acd25b16681a060d28d10eeacf98d07701;p=openwrt%2Fstaging%2Fblogic.git drm/nv50/fb: prevent oops on chipsets without compression tags Unconditionally create the tagram mm, even if there's zero tags. Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c index 27fb1af7a779..5f570806143a 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c @@ -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) {