From patchwork Tue Dec 21 01:41:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Airlie X-Patchwork-Id: 423151 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBL1fraM016735 for ; Tue, 21 Dec 2010 01:42:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933472Ab0LUBl7 (ORCPT ); Mon, 20 Dec 2010 20:41:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38262 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933464Ab0LUBl6 (ORCPT ); Mon, 20 Dec 2010 20:41:58 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBL1foxi002066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Dec 2010 20:41:50 -0500 Received: from clockmaker-el6.bne.redhat.com (dhcp-0-222.bne.redhat.com [10.64.0.222]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oBL1ffm1024946; Mon, 20 Dec 2010 20:41:49 -0500 From: Dave Airlie To: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.sf.net, linux-kernel@vger.kernel.org, Dave Airlie Subject: [PATCH 3/3] fbcon: fix situation where fbcon gets deinitialised and can't reinit. Date: Tue, 21 Dec 2010 11:41:17 +1000 Message-Id: <1292895677-4242-4-git-send-email-airlied@gmail.com> In-Reply-To: <1292895677-4242-1-git-send-email-airlied@gmail.com> References: <1292895677-4242-1-git-send-email-airlied@gmail.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Dec 2010 01:42:19 +0000 (UTC) diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 7ccc967..6662687 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -823,10 +823,10 @@ static int set_con2fb_map(int unit, int newidx, int user) if (oldidx == newidx) return 0; - if (!info || fbcon_has_exited) + if (!info) return -EINVAL; - if (!err && !search_for_mapped_con()) { + if (!search_for_mapped_con() || !con_is_bound(&fb_con)) { info_idx = newidx; return fbcon_takeover(0); }