From patchwork Wed Jul 15 10:31:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1329369 X-Patchwork-Delegate: sbabic@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=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Kqh07ppJ; 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 4B6DHY691Sz9sTM for ; Wed, 15 Jul 2020 20:33:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DF09D81BF0; Wed, 15 Jul 2020 12:32:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="Kqh07ppJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9106B81CB9; Wed, 15 Jul 2020 12:31:43 +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,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E1A6E81C3C for ; Wed, 15 Jul 2020 12:31:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x244.google.com with SMTP id z24so1975848ljn.8 for ; Wed, 15 Jul 2020 03:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vdGbT0KAg455zQO1HwNMDszkvGRYUyHtA5C+svkAFhk=; b=Kqh07ppJWT3hfTZ5zXVONH46vZfQwSILhNaAW+LDhElRMbR6pDZQnGO/9FOwVOgK5P F8xVncYffPnZ9Qio0nojuV5xmZERpOpGhlPxA2vvnbuAX0k7OrMloMY9JynwyUevSkHy r8FzIjaZ988mpWOLvZ3TFdbNiASGaiNLSzTMJub2anER/fZWEu/9zFVie7gbEd01Sunm jU+1iAdn5RtgjTn11UUjmnGo8WBQJGgdYPUGVkNA+08wyfvawEy8pcR6bS475KZ0LNaD aLKm3qPlMqeZlPKkd40NuGECzh1Gp+l2JD6wb5zdtn7Ol7v+TrqULRcGrL4XxkdBiLD3 BGPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vdGbT0KAg455zQO1HwNMDszkvGRYUyHtA5C+svkAFhk=; b=QVdIJGDco3YcRQ1zwvXY0NPgQte/4+oXNz6non5ck+oxDQMSTMFvG6o2CRX1ZwyRVa M08j8i6ICG/p9nJq83aqV9QZ1xJlCMgtcUciDeFSg6huLOgQwvHYtHnGM04TGe1zxn17 2avSdT/ZUNcYWV82looGnrzkY3BC867mRkhParZjMvuxUEEeBSIkiq06w2aNsc20qKSC 0oOc8SzNONAoZZQriFtAKHrKgePYGrfyNNHP61kZ9ioXrg/3y937z4/h2nFy8uQt0ko9 5lqyDvYZKRyTHsUJki8nFYrqThOg65kLEtdu4e4r4igw3iqEtv5v2pA1bIYWmdWJhRjp gpvQ== X-Gm-Message-State: AOAM530zGCPJ3hU4CWQcSWm/Nj5nqHBvAYzEnmulUlyuvDnURrbeOZv6 2YVbt86hqT1RNXzncrg4g8G94y/7r3M= X-Google-Smtp-Source: ABdhPJwjooX0nvDmXkKAuZjOgPdOCqDcNXuB2Rm5Iudqp6melbVu9FO3PR5NihnODsIVlXaBJ5uI9A== X-Received: by 2002:a2e:9bda:: with SMTP id w26mr4214400ljj.107.1594809097841; Wed, 15 Jul 2020 03:31:37 -0700 (PDT) Received: from localhost (host-176-37-176-139.la.net.ua. [176.37.176.139]) by smtp.gmail.com with ESMTPSA id 203sm374839ljf.14.2020.07.15.03.31.36 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Jul 2020 03:31:36 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: sbabic@denx.de, Marcel Ziswiler , Max Krummenacher , festevam@gmail.com, peng.fan@nxp.com, Oleksandr Suvorov , Igor Opaniuk , Joe Hershberger , Simon Glass Subject: [PATCH v2 10/14] toradex: common: show boot logo Date: Wed, 15 Jul 2020 13:31:01 +0300 Message-Id: <20200715103105.8622-11-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200715103105.8622-1-igor.opaniuk@gmail.com> References: <20200715103105.8622-1-igor.opaniuk@gmail.com> 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 From: Igor Opaniuk Add function for showing boot logo, embed into u-boot blob. Signed-off-by: Igor Opaniuk --- (no changes since v1) board/toradex/common/tdx-common.c | 26 ++++++++++++++++++++++++++ board/toradex/common/tdx-common.h | 4 ++++ 2 files changed, 30 insertions(+) diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index 7e353b4fd9..ae6489667f 100644 --- a/board/toradex/common/tdx-common.c +++ b/board/toradex/common/tdx-common.c @@ -9,6 +9,13 @@ #include #include +#ifdef CONFIG_DM_VIDEO +#include +#include +#include +#include +#endif + #include "tdx-cfg-block.h" #include #include "tdx-common.h" @@ -196,3 +203,22 @@ int ft_common_board_setup(void *blob, bd_t *bd) } #endif /* CONFIG_TDX_CFG_BLOCK */ + +#if defined(CONFIG_DM_VIDEO) +int show_boot_logo(void) +{ + struct udevice *dev; + int ret; + int xpos, ypos; + + splash_get_pos(&xpos, &ypos); + + ret = uclass_get_device(UCLASS_VIDEO, 0, &dev); + if (ret) + return ret; + + ret = video_bmp_display(dev, (ulong)bmp_logo_bitmap, xpos, ypos, true); + + return ret; +} +#endif /* CONFIG_DM_VIDEO */ diff --git a/board/toradex/common/tdx-common.h b/board/toradex/common/tdx-common.h index c537dca71e..63614c8671 100644 --- a/board/toradex/common/tdx-common.h +++ b/board/toradex/common/tdx-common.h @@ -11,4 +11,8 @@ int ft_common_board_setup(void *blob, bd_t *bd); +#if defined(CONFIG_DM_VIDEO) +int show_boot_logo(void); +#endif + #endif /* _TDX_COMMON_H */