From: Francisco Jerez Date: Sat, 10 Jul 2010 15:37:00 +0000 (+0200) Subject: drm/nouveau: Fix crashes during fbcon init on single head cards. X-Git-Tag: v2.6.35-rc6~12^2~3 X-Git-Url: https://bbs.cooldavid.org/git/?p=net-next-2.6.git;a=commitdiff_plain;h=7173aeff025a7fed3fa903e362bf773e6258dd47 drm/nouveau: Fix crashes during fbcon init on single head cards. this fixes a regression since the fbcon rework. Signed-off-by: Francisco Jerez Signed-off-by: Ben Skeggs Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index c9a4a0d2a11..257ea130ae1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -387,7 +387,8 @@ int nouveau_fbcon_init(struct drm_device *dev) dev_priv->nfbdev = nfbdev; nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs; - ret = drm_fb_helper_init(dev, &nfbdev->helper, 2, 4); + ret = drm_fb_helper_init(dev, &nfbdev->helper, + nv_two_heads(dev) ? 2 : 1, 4); if (ret) { kfree(nfbdev); return ret;