From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CBE32C433FE for ; Fri, 19 Nov 2021 20:27:52 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4894B613C8 for ; Fri, 19 Nov 2021 20:27:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4894B613C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B55C083420; Fri, 19 Nov 2021 21:26:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="GN4IR31e"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1FB948377F; Fri, 19 Nov 2021 21:25:41 +0100 (CET) Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (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 05E1B8378C for ; Fri, 19 Nov 2021 21:24:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x334.google.com with SMTP id h19-20020a9d3e53000000b0056547b797b2so18487694otg.4 for ; Fri, 19 Nov 2021 12:24:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3Aj3Fc5mGHaykRgriWZv8pow72kYJEm6FAUstIMj6fE=; b=GN4IR31ek1AHlBdOrC1r9nxO4Uvqe6pnkg2lsmrJIrUCKCit0h20i6PfhDGnSufDpX 4CA6HpGNbbGIsYzuxhpl7FmOn66rSqeWBLUSDmAgIXX+8xzA03IEhrN5O11bPAb6Khcz CAK0fbiPrNAHOnhIwBbh5yk0Kg/S1IbtVhAwk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3Aj3Fc5mGHaykRgriWZv8pow72kYJEm6FAUstIMj6fE=; b=8CsgmeI2SxzsBeKwPi0zw6Ixii83DvcHpx2mdeprpLbEmXPwgA6cwadC8VFfNtUgPY RyHamrLL9zvP/IdWTZ4EH3rstZVOQlKM3MKTZ/ej42ILkP+2f9KS3KJjme+11Uxmvt3x 32NFUNV/HJPxB0i7ijnrgZVn6VghhpPg4ZVjQORpitujQ9rW19NJQbTLt5NBVoeaZzd3 sHzEibl4qtzi3pXOmEbaSxAjyT7TPNo1ATje+gYpFaVIbRTqJAXRKfz9GgpWDbk+5djJ clmCeIDy9dX2Zngxytd6XzyM3+W71z2rwlNMpyCstSCXwQsA7woWvWRFBnGO4DJRum43 ezQQ== X-Gm-Message-State: AOAM532B5Rf4n4tIiAR1f/SbbqnZyKI1o8nP9O8IwxE7dY5CQvnviWD+ soC0QWxUygZR3fGHB24Eg9+LSWrSTef9kA== X-Google-Smtp-Source: ABdhPJxudMsyoYeJvY2Rdvbjh47IkFcktt1OHV7K5VhlPyrChvxyFYmaWAlE8ZXaFWrYSU5RSQfWPA== X-Received: by 2002:a9d:68d5:: with SMTP id i21mr6953165oto.107.1637353480346; Fri, 19 Nov 2021 12:24:40 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id bl33sm197093oib.47.2021.11.19.12.24.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 12:24:40 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Anatolij Gustschin , Tom Rini , Simon Glass , Bin Meng , Jaehoon Chung Subject: [PATCH 21/23] video: Support virtio devices with the splash screen Date: Fri, 19 Nov 2021 13:24:05 -0700 Message-Id: <20211119202408.1815506-22-sjg@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211119202408.1815506-1-sjg@chromium.org> References: <20211119202408.1815506-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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.103.2 at phobos.denx.de X-Virus-Status: Clean This is useful for showing a logo when booting from qemu. Signed-off-by: Simon Glass --- common/splash_source.c | 14 ++++++++++++++ include/splash.h | 1 + include/virtio.h | 1 + 3 files changed, 16 insertions(+) diff --git a/common/splash_source.c b/common/splash_source.c index d05670f5ee8..2c03cbdf928 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -20,6 +20,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -179,6 +180,16 @@ static inline int splash_init_sata(void) } #endif +static int splash_init_virtio(void) +{ + if (!IS_ENABLED(CONFIG_VIRTIO)) { + printf("Cannot load splash image: no virtio support\n"); + return -ENOSYS; + } else { + return virtio_init(); + } +} + #ifdef CONFIG_CMD_UBIFS static int splash_mount_ubifs(struct splash_location *location) { @@ -233,6 +244,9 @@ static int splash_load_fs(struct splash_location *location, u32 bmp_load_addr) if (location->storage == SPLASH_STORAGE_SATA) res = splash_init_sata(); + if (location->storage == SPLASH_STORAGE_VIRTIO) + res = splash_init_virtio(); + if (location->ubivol != NULL) res = splash_mount_ubifs(location); diff --git a/include/splash.h b/include/splash.h index 7fd2de8fea1..33e45e69416 100644 --- a/include/splash.h +++ b/include/splash.h @@ -30,6 +30,7 @@ enum splash_storage { SPLASH_STORAGE_MMC, SPLASH_STORAGE_USB, SPLASH_STORAGE_SATA, + SPLASH_STORAGE_VIRTIO, }; enum splash_flags { diff --git a/include/virtio.h b/include/virtio.h index a42bdad6b87..34e2bfdcdd3 100644 --- a/include/virtio.h +++ b/include/virtio.h @@ -20,6 +20,7 @@ #ifndef __VIRTIO_H__ #define __VIRTIO_H__ +#include #include #include #define VIRTIO_ID_NET 1 /* virtio net */ -- 2.34.0.rc2.393.gf8c9666880-goog