From patchwork Mon Jul 30 10:54:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bogendoerfer X-Patchwork-Id: 1254211 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id CC9973FC5A for ; Mon, 30 Jul 2012 11:30:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753224Ab2G3La2 (ORCPT ); Mon, 30 Jul 2012 07:30:28 -0400 Received: from elvis.franken.de ([193.175.24.41]:32913 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753210Ab2G3LaQ (ORCPT ); Mon, 30 Jul 2012 07:30:16 -0400 X-Greylist: delayed 2125 seconds by postgrey-1.27 at vger.kernel.org; Mon, 30 Jul 2012 07:30:16 EDT Received: from uucp (helo=solo.franken.de) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1Svncg-0007cs-00; Mon, 30 Jul 2012 12:54:50 +0200 Received: by solo.franken.de (Postfix, from userid 1000) id DBB961D1CF; Mon, 30 Jul 2012 12:54:16 +0200 (CEST) From: Thomas Bogendoerfer Subject: [PATCH] Fix newport con crashes To: linux-mips@linux-mips.org, linux-fbdev@vger.kernel.org cc: ralf@linux-mips.org, FlorianSchandinat@gmx.de Message-Id: <20120730105416.DBB961D1CF@solo.franken.de> Date: Mon, 30 Jul 2012 12:54:16 +0200 (CEST) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Because of commit e84de0c61905030a0fe66b7210b6f1bb7c3e1eab [MIPS: GIO bus support for SGI IP22/28] newport con is now taking over console from dummy con, therefore it's necessary to resize the VC to the correct size to avoid crashes and garbage on console Signed-off-by: Thomas Bogendoerfer --- drivers/video/console/newport_con.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index 6d15966..b05afd0 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c @@ -327,9 +327,16 @@ out_unmap: static void newport_init(struct vc_data *vc, int init) { - vc->vc_cols = newport_xsize / 8; - vc->vc_rows = newport_ysize / 16; + int cols, rows; + + cols = newport_xsize / 8; + rows = newport_ysize / 16; vc->vc_can_do_color = 1; + if (init) { + vc->vc_cols = cols; + vc->vc_rows = rows; + } else + vc_resize(vc, cols, rows); } static void newport_deinit(struct vc_data *c)