From patchwork Wed Jul 1 12:56:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 1321067 X-Patchwork-Delegate: trini@ti.com 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=pass (p=none dis=none) header.from=st.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=st.com header.i=@st.com header.a=rsa-sha256 header.s=STMicroelectronics header.b=fi4e57qJ; 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 49yB1s12Yxz9sTV for ; Thu, 2 Jul 2020 18:23:28 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E0B4681BF0; Thu, 2 Jul 2020 10:18:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=st.com header.i=@st.com header.b="fi4e57qJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 54A80818E7; Wed, 1 Jul 2020 14:56:30 +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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (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 65F658006D for ; Wed, 1 Jul 2020 14:56:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@st.com Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 061CsocU018096; Wed, 1 Jul 2020 14:56:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=5M/YIE913Y81F2wAKSCOzhmFWI32bnToA7UHhW6NYt8=; b=fi4e57qJq69zXULwMI7V0MW+RjTV/heOIn/uAhJIEHk0BydkrzlU7ByXSMhXciJLuXto eiYYa0J9DurqhZP+qcDnADJEEN6spovzOpbOfqN35IU273Y5eMXsfU+wyxSqNOiWm4hc fHCL55hzpah3jujjWHeg7xJaGXbWDC8/DISF+qQI2J9To44c1gvbeV9RE4DFZ8d4pkXZ J6jqLXvFwtxrM8eVDJEOxC2F8czssin7A49zHKLR8Es73MjHGUQiPbrJcX3s97hfpF3/ WlLj9V5pq/IYx/LRvRjN3Pw0qbUmne60gQmIHBsHvXnhAWMmYaXwVJ3mUcbAU4oQD4Qm Tg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 31ww0ga2c5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Jul 2020 14:56:22 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 310CA100038; Wed, 1 Jul 2020 14:56:21 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag6node3.st.com [10.75.127.18]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BA78D2B66D2; Wed, 1 Jul 2020 14:56:21 +0200 (CEST) Received: from localhost (10.75.127.44) by SFHDAG6NODE3.st.com (10.75.127.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 1 Jul 2020 14:56:21 +0200 From: Patrick Delaunay To: CC: Simon Glass , Tom Rini , Soeren Moch , Anatolij Gustschin , Patrick Delaunay , Heinrich Schuchardt , Joe Hershberger , Patrice Chotard , =?utf-8?q?Yannick_Fertr=C3=A9?= , U-Boot STM32 Subject: [PATCH] video: restore CONFIG_VIDCONSOLE_AS_LCD as boolean Date: Wed, 1 Jul 2020 14:56:10 +0200 Message-ID: <20200701125610.22340-1-patrick.delaunay@st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG5NODE1.st.com (10.75.127.13) To SFHDAG6NODE3.st.com (10.75.127.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-01_08:2020-07-01, 2020-07-01 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.3 at phobos.denx.de X-Virus-Status: Clean This patch restores CONFIG_VIDCONSOLE_AS_LCD as boolean and introduce a separate sting as CONFIG_VIDCONSOLE_AS_NAME to search this string in stdout used as videoconsole. This patch avoid issue with board defconfig or code expecting CONFIG_VIDCONSOLE_AS_LCD as boolean. Fixes: 22b897a12323 ("video: extend stdout video console work-around for 'vga'") Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass --- Hi, It is fix for stm32mp157c-ev1 boot on next branch. The option names are not perfect but it is only a temporarily work around (up to end of 2020). You can see other example of boolean and string in Kconfig = config USE_BOOTCOMMAND config BOOTCOMMAND I think the correct name could be: - CONFIG_USE_VIDCONSOLE_AS_NAME - CONFIG_VIDCONSOLE_AS_NAME but these name need to modify many file for a fix on a workaround CONFIG. Regards, Patrick common/console.c | 6 +++--- drivers/video/Kconfig | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/common/console.c b/common/console.c index f149624954..7b9816979a 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, CONFIG_VIDCONSOLE_AS_LCD)) + if (!dev && !strcmp(name, CONFIG_VIDCONSOLE_AS_NAME)) dev = stdio_get_by_name("vidconsole"); #endif @@ -897,9 +897,9 @@ done: stdio_print_current_devices(); #endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */ #ifdef CONFIG_VIDCONSOLE_AS_LCD - if (strstr(stdoutname, CONFIG_VIDCONSOLE_AS_LCD)) + if (strstr(stdoutname, CONFIG_VIDCONSOLE_AS_NAME)) printf("Warning: Please change '%s' to 'vidconsole' in stdout/stderr environment vars\n", - CONFIG_VIDCONSOLE_AS_LCD); + CONFIG_VIDCONSOLE_AS_NAME); #endif #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 52f5bc6127..0cf13adc7d 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -177,8 +177,18 @@ config SIMPLE_PANEL source "drivers/video/fonts/Kconfig" config VIDCONSOLE_AS_LCD - string "Use 'vidconsole' when string defined here is seen in stdout" + bool "Use 'vidconsole' when CONFIG_VIDCONSOLE_AS_NAME string is seen in stdout" depends on DM_VIDEO + 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 VIDCONSOLE_AS_NAME + string "Use 'vidconsole' when string defined here is seen in stdout" + depends on VIDCONSOLE_AS_LCD default "lcd" if LCD || TEGRA_COMMON default "vga" if !LCD help