diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-10-30 20:51:00 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-30 21:23:23 -0400 |
commit | 5cad16acd25b16681a060d28d10eeacf98d07701 (patch) | |
tree | d00389a956a6809d392ce95d20331ed6122bc675 /drivers/gpu | |
parent | a7dbf00433fa9dc6f4a3828a17d56a9df2bd06b1 (diff) |
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 <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c | 10 |
1 files changed, 4 insertions, 6 deletions
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, | |||
219 | ((priv->base.ram.size & 0x000000ff) << 32); | 219 | ((priv->base.ram.size & 0x000000ff) << 32); |
220 | 220 | ||
221 | tags = nv_rd32(priv, 0x100320); | 221 | tags = nv_rd32(priv, 0x100320); |
222 | if (tags) { | 222 | ret = nouveau_mm_init(&priv->base.tags, 0, tags, 1); |
223 | ret = nouveau_mm_init(&priv->base.tags, 0, tags, 1); | 223 | if (ret) |
224 | if (ret) | 224 | return ret; |
225 | return ret; | ||
226 | 225 | ||
227 | nv_debug(priv, "%d compression tags\n", tags); | 226 | nv_debug(priv, "%d compression tags\n", tags); |
228 | } | ||
229 | 227 | ||
230 | size = (priv->base.ram.size >> 12) - rsvd_head - rsvd_tail; | 228 | size = (priv->base.ram.size >> 12) - rsvd_head - rsvd_tail; |
231 | switch (device->chipset) { | 229 | switch (device->chipset) { |