From patchwork Wed Nov 1 14:18:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 832959 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yRr5z4j94z9sPs for ; Thu, 2 Nov 2017 01:22:47 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 5D3A2C21D93; Wed, 1 Nov 2017 14:22:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8BF06C21C34; Wed, 1 Nov 2017 14:22:37 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EF0FBC21C35; Wed, 1 Nov 2017 14:22:35 +0000 (UTC) Received: from tiger.birch.relay.mailchannels.net (tiger.birch.relay.mailchannels.net [23.83.209.248]) by lists.denx.de (Postfix) with ESMTPS id 26EF1C21C29 for ; Wed, 1 Nov 2017 14:22:34 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1EA5620A3C0; Wed, 1 Nov 2017 14:22:33 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.148.17]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id 9544020A761; Wed, 1 Nov 2017 14:22:32 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.20.88.133]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.9.14); Wed, 01 Nov 2017 14:22:33 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Desert-Dime: 4ec5435f686272c0_1509546152989_2325254746 X-MC-Loop-Signature: 1509546152988:1984329404 X-MC-Ingress-Time: 1509546152988 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 1DB2D48528; Wed, 1 Nov 2017 14:22:28 +0000 (UTC) From: Icenowy Zheng To: Anatolij Gustschin , Maxime Ripard Date: Wed, 1 Nov 2017 22:18:07 +0800 Message-Id: <20171101141807.38705-3-icenowy@aosc.io> In-Reply-To: <20171101141807.38705-1-icenowy@aosc.io> References: <20171101141807.38705-1-icenowy@aosc.io> Cc: u-boot@lists.denx.de, linux-sunxi@googlegroups.com, Icenowy Zheng Subject: [U-Boot] [PATCH v2 2/2] video: sunxi: de2: add support for LCD SimpleFB X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Add support for setting up SimpleFB for LCD display output in DE2 SimpleFB setup code. Signed-off-by: Icenowy Zheng Reviewed-by: Jagan Teki Acked-by: Maxime Ripard --- Changes in v2: - Use lcd variable. - Extract the HDMI SimpleFB fix to a dedicated patch. drivers/video/sunxi/sunxi_de2.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c index 6d6bb2e0c3..860187323c 100644 --- a/drivers/video/sunxi/sunxi_de2.c +++ b/drivers/video/sunxi/sunxi_de2.c @@ -319,7 +319,7 @@ U_BOOT_DEVICE(sunxi_de2) = { #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_VIDEO_DT_SIMPLEFB) int sunxi_simplefb_setup(void *blob) { - struct udevice *de2, *hdmi; + struct udevice *de2, *hdmi, *lcd; struct video_priv *de2_priv; struct video_uc_platdata *de2_plat; int mux; @@ -355,6 +355,15 @@ int sunxi_simplefb_setup(void *blob) debug("HDMI present but not probed\n"); } + ret = uclass_find_device_by_name(UCLASS_DISPLAY, + "sunxi_lcd", &lcd); + if (ret) + debug("LCD not present\n"); + else if (device_active(lcd)) + pipeline = "mixer0-lcd0"; + else + debug("LCD present but not probed\n"); + if (!pipeline) { debug("No active display present\n"); return 0;