From patchwork Sat May 23 15:11:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 1296713 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=rgVfWoyS; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49TmzD2M3Bz9sRf for ; Sun, 24 May 2020 01:11:33 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5C639813A5; Sat, 23 May 2020 17:11:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1590246686; bh=vGIxByDotQclYn9QImYCnGPupcTSPdC3nM660JKt+CY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rgVfWoySdvXuLzDiGEAAJug6D1ZJwxApCjQweq86SHcwPXWek4PPlIUbuykoXOqCR 6a5WjIEkXMAW/vLidZc+FlxRfIPr6VAdkpu69QNFVZIsDbvr++U3wTvU/gB/jU6qTX t+S4lHA8Xvsotc31HQHxui9SZ94VqRHhojvUoISUwzgSc34mn901aw38w7DYqLj3OE TStlGUzwS1peft80hE55vBVdbZGEp1nxo9caAGuj3RYGWHUIutu5qZpGJ2P1gRzr0+ h+xyCKqlY6K1k7nsJNUZjw5P/MJHiwklbQeqVc/Ow1tFk/aeG4F4JlO8OsAspM5Pxr 30330mp3fn7Aw== Received: by phobos.denx.de (Postfix, from userid 109) id C4D6B813A6; Sat, 23 May 2020 17:11:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D004481346 for ; Sat, 23 May 2020 17:11:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=agust@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49Tmyx3RKcz1qrG5; Sat, 23 May 2020 17:11:21 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49Tmyx2pmLz1qr3x; Sat, 23 May 2020 17:11:21 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Yz6JyrgAbSoF; Sat, 23 May 2020 17:11:20 +0200 (CEST) X-Auth-Info: pksYrxybyORSegC/8KL30Bs5YFYeSnNnUNS3o9B1fyI= Received: from crub.agik.hopto.org (pd95f11d0.dip0.t-ipconnect.de [217.95.17.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 23 May 2020 17:11:20 +0200 (CEST) From: Anatolij Gustschin To: u-boot@lists.denx.de Cc: twarren@nvidia.com, sjg@chromium.org, smoch@web.de Subject: [PATCH] video: extend stdout video console work-around for 'vga' Date: Sat, 23 May 2020 17:11:20 +0200 Message-Id: <20200523151120.4273-1-agust@denx.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <5b441050-d103-68e0-cae1-7abb84855275@web.de> References: <5b441050-d103-68e0-cae1-7abb84855275@web.de> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean cfb_console driver use 'vga' console name and we still have board environments defining this name. Re-use existing DM_VIDEO work- around for console name to support 'vga' name in stdout environment. Signed-off-by: Anatolij Gustschin Tested-by: Soeren Moch Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- arch/arm/mach-tegra/Kconfig | 1 - common/console.c | 7 ++++--- drivers/video/Kconfig | 16 +++++++++------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 00facf492e..15e7684028 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -58,7 +58,6 @@ config TEGRA_COMMON select MISC select OF_CONTROL select SPI - select VIDCONSOLE_AS_LCD if DM_VIDEO imply CMD_DM imply CRC32_VERIFY diff --git a/common/console.c b/common/console.c index 1deca3cb78..f149624954 100644 --- a/common/console.c +++ b/common/console.c @@ -713,7 +713,7 @@ struct stdio_dev *search_device(int flags, const char *name) dev = stdio_get_by_name(name); #ifdef CONFIG_VIDCONSOLE_AS_LCD - if (!dev && !strcmp(name, "lcd")) + if (!dev && !strcmp(name, CONFIG_VIDCONSOLE_AS_LCD)) dev = stdio_get_by_name("vidconsole"); #endif @@ -897,8 +897,9 @@ done: stdio_print_current_devices(); #endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */ #ifdef CONFIG_VIDCONSOLE_AS_LCD - if (strstr(stdoutname, "lcd")) - printf("Warning: Please change 'lcd' to 'vidconsole' in stdout/stderr environment vars\n"); + if (strstr(stdoutname, CONFIG_VIDCONSOLE_AS_LCD)) + printf("Warning: Please change '%s' to 'vidconsole' in stdout/stderr environment vars\n", + CONFIG_VIDCONSOLE_AS_LCD); #endif #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 38123543a5..28c22fe525 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -146,14 +146,16 @@ config NO_FB_CLEAR source "drivers/video/fonts/Kconfig" config VIDCONSOLE_AS_LCD - bool "Use 'vidconsole' when 'lcd' is seen in stdout" + string "Use 'vidconsole' when string defined here is seen in stdout" depends on DM_VIDEO - help - This is a work-around for boards which have 'lcd' in their stdout - environment variable, but have moved to use driver model for video. - In this case the console will no-longer work. While it is possible - to update the environment, the breakage may be confusing for users. - This option will be removed around the end of 2016. + default "lcd" if LCD || TEGRA_COMMON + default "vga" if !LCD + help + This is a work-around for boards which have 'lcd' or 'vga' in their + stdout environment variable, but have moved to use driver model for + video. In this case the console will no-longer work. While it is + possible to update the environment, the breakage may be confusing for + users. This option will be removed around the end of 2020. config VIDEO_COREBOOT bool "Enable coreboot framebuffer driver support"