From patchwork Mon Jan 12 20:17:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 5616281 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 193279F3A0 for ; Mon, 12 Jan 2015 20:17:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0AB7720395 for ; Mon, 12 Jan 2015 20:17:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1B98920386 for ; Mon, 12 Jan 2015 20:17:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753220AbbALURF (ORCPT ); Mon, 12 Jan 2015 15:17:05 -0500 Received: from albert.telenet-ops.be ([195.130.137.90]:39207 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751217AbbALURD (ORCPT ); Mon, 12 Jan 2015 15:17:03 -0500 Received: from ayla.of.borg ([84.193.93.87]) by albert.telenet-ops.be with bizsmtp id f8H11p0171t5w8s068H2ZQ; Mon, 12 Jan 2015 21:17:02 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1YAlQ5-0005yb-R4; Mon, 12 Jan 2015 21:17:01 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1YAlQ9-0006yE-7r; Mon, 12 Jan 2015 21:17:05 +0100 From: Geert Uytterhoeven To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH resend] console/dummy: Move screen size selection from CPP to Kconfig Date: Mon, 12 Jan 2015 21:17:02 +0100 Message-Id: <1421093822-26761-1-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP PA-RISC already handled the dummy console screen size selection in Kconfig, so generalize this to other platforms. ARM keeps on using screen_info, which is filled in by platform-specific code, or from ATAGS. Signed-off-by: Geert Uytterhoeven --- drivers/video/console/Kconfig | 16 ++++++++++------ drivers/video/console/dummycon.c | 5 +---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index fe1cd0148e139eaa..ba97efc3bf707db8 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -77,18 +77,22 @@ config DUMMY_CONSOLE config DUMMY_CONSOLE_COLUMNS int "Initial number of console screen columns" - depends on PARISC && DUMMY_CONSOLE - default "160" + depends on DUMMY_CONSOLE && !ARM + default 160 if PARISC + default 80 help - The default value is 160, which should fit a 1280x1024 monitor. + On PA-RISC, the default value is 160, which should fit a 1280x1024 + monitor. Select 80 if you use a 640x480 resolution by default. config DUMMY_CONSOLE_ROWS int "Initial number of console screen rows" - depends on PARISC && DUMMY_CONSOLE - default "64" + depends on DUMMY_CONSOLE && !ARM + default 64 if PARISC + default 25 help - The default value is 64, which should fit a 1280x1024 monitor. + On PA-RISC, the default value is 64, which should fit a 1280x1024 + monitor. Select 25 if you use a 640x480 resolution by default. config FRAMEBUFFER_CONSOLE diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index 40bec8d64b0a4a56..0efc52f11ad003ae 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c @@ -20,13 +20,10 @@ #if defined(__arm__) #define DUMMY_COLUMNS screen_info.orig_video_cols #define DUMMY_ROWS screen_info.orig_video_lines -#elif defined(__hppa__) +#else /* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */ #define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS #define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS -#else -#define DUMMY_COLUMNS 80 -#define DUMMY_ROWS 25 #endif static const char *dummycon_startup(void)