From patchwork Sat Feb 6 21:31:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 579910 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id E66A8140325 for ; Sun, 7 Feb 2016 08:31:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=Gx7WUn7m; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 28E22A75CD; Sat, 6 Feb 2016 22:31:53 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8g4K9dtBjdsg; Sat, 6 Feb 2016 22:31:52 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6458FA759A; Sat, 6 Feb 2016 22:31:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7E401A75BA for ; Sat, 6 Feb 2016 22:31:49 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ujZtVDkQy6tX for ; Sat, 6 Feb 2016 22:31:49 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ob0-f179.google.com (mail-ob0-f179.google.com [209.85.214.179]) by theia.denx.de (Postfix) with ESMTPS id 04923A7529 for ; Sat, 6 Feb 2016 22:31:44 +0100 (CET) Received: by mail-ob0-f179.google.com with SMTP id xk3so116852332obc.2 for ; Sat, 06 Feb 2016 13:31:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=RzpagMyEWDyhGsJAIBXT7sVLmm9D67GqwI1HUWk/Qa4=; b=Gx7WUn7m7JA4V96MSOPAD6cE5nvHyaGe7XvKkhW19jWEqVott6pxrOI3QuUO8zDcIo sknsa5kAwhZ/fEh8JUHfWaKt9BQtU/Y5lk9LmmEbDjpVCJD3NyKilWKGlDIWUqZSf1tj X810uNSXMTt1tZHKKTiB7VevT+dnsUrE46HNs0vzwlcbwK5ZskKa3Ngt2oWtEEcScNxv t2oxFf+Xiil53YNZcB4X9OGHyXtQ5uA+vOYCgxN1dLit6ox+8CIU5pEYnnGxBIa556NJ DATAEGKpYI1siHML/kI2RzyDoxWiLaGiiT7y7kO8ULEEWJ1si7EuGtOOS0lXE+S5KjTD PPKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=RzpagMyEWDyhGsJAIBXT7sVLmm9D67GqwI1HUWk/Qa4=; b=YJvMfBtzLVp5m4Wm0r5JxY96Dazt2nOKUG5ti2hav6kFVeH0FFrUbNsAjwqMjloBDS qD8dCP2tJIcT73XEfBLimdznBTJVEtCbHwaibInd3r7Ee/AGI1FPYmld50IJ3XLDq5fG +lCsjkx4XCoZRLdEW7ebqH5M5tVtWv16Yk6JA3H9zTqSd7JoUcdoD2aWFu2rQgffS5i5 7joduvSu2AgpACajXbu6jMA2LVLNPbQ3BFEXh5tw5p/UlNJFxca4xnibOv4dlO7wyRhj 87RzlDbtupMFFrxQKEnLBiT7E/kRj12wrmbW6bVd0F2CBRjC99hcrWMZkak09oAcgWYx O2Xw== X-Gm-Message-State: AG10YORENgHCuSRexU0C+5Qn/Jns6UuF9cb4Dzg8ZfXoOe9bIa39RQF8VpPw3LF+/0C1vkV+ X-Received: by 10.182.130.162 with SMTP id of2mr17375689obb.57.1454794303149; Sat, 06 Feb 2016 13:31:43 -0800 (PST) Received: from kaki.bld.corp.google.com ([2620:0:1005:1100:45fe:7852:bb32:47ab]) by smtp.gmail.com with ESMTPSA id cd5sm12488814oec.15.2016.02.06.13.31.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Feb 2016 13:31:42 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 220F6220974; Sat, 6 Feb 2016 14:31:40 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Sat, 6 Feb 2016 14:31:37 -0700 Message-Id: <1454794298-20111-1-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 Cc: Stephen Warren , Tom Warren Subject: [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Boards with a saved environment may use 'lcd' in their stdout environment variable, expecting that this will enable output to the LCD. When the board moves to use driver model for video, this will no-longer work. Add a work-around to fix this. A warning messages is printed, and we will remove the work-around at the end of 2016. Signed-off-by: Simon Glass Acked-by: Anatolij Gustschin Tested-by: Stephen Warren --- common/console.c | 8 ++++++++ drivers/video/Kconfig | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/common/console.c b/common/console.c index b3f5fdc..6a0d11b 100644 --- a/common/console.c +++ b/common/console.c @@ -650,6 +650,10 @@ struct stdio_dev *search_device(int flags, const char *name) struct stdio_dev *dev; dev = stdio_get_by_name(name); +#ifdef CONFIG_VIDCONSOLE_AS_LCD + if (!dev && !strcmp(name, "lcd")) + dev = stdio_get_by_name("vidconsole"); +#endif if (dev && (dev->flags & flags)) return dev; @@ -795,6 +799,10 @@ done: #ifndef CONFIG_SYS_CONSOLE_INFO_QUIET 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"); +#endif #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE /* set the environment variables (will overwrite previous env settings) */ diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 981ba8b..ae6c244 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -57,6 +57,16 @@ config VIDEO_ROTATION struct video_priv: 0=unrotated, 1=90 degrees clockwise, 2=180 degrees, 3=270 degrees. +config VIDCONSOLE_AS_LCD + bool "Use 'vidconsole' when 'lcd' 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. + config VIDEO_VESA bool "Enable VESA video driver support" default n