From patchwork Tue Apr 4 13:05:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764928 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=ZXcjcUNA; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSjx0SZVz1yZT for ; Tue, 4 Apr 2023 23:08:05 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5445485DF4; Tue, 4 Apr 2023 15:06:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="ZXcjcUNA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E386185D77; Tue, 4 Apr 2023 15:06: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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 346CE8594F for ; Tue, 4 Apr 2023 15:06:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6JHR097343; Tue, 4 Apr 2023 08:06:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613579; bh=c+n7U3hVdUNMp/zIG36qwgBesMs74ifyIrqA1J/1lsI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ZXcjcUNAxwufBI5pUdcdsxZS6KjtbJCc1t+q4QTn5k+xtoDJQNzcHu3p8Lbkw7Fm7 I3IXJtLqcIOS0RTcUpVsXOaf6rWB/d3d1SRL87VhXw+Sj23JJV9PGhW9gra6lYLScU +73DQteXe5yFYGqIOoFFGHJhjY6yoe6w20BySpDE= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6Jrf041092 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:19 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:19 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:19 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6I9H014603; Tue, 4 Apr 2023 08:06:18 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 01/13] drivers: video: Kconfig: Add configs for enabling video at SPL Date: Tue, 4 Apr 2023 18:35:58 +0530 Message-ID: <20230404130610.65022-2-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Add Kconfigs which enable the video driver and splash screen at SPL stage only and not at u-boot proper. The existing Kconfigs from u-boot proper were not used to make SPL splash screen independent to them. Signed-off-by: Nikhil M Jain Reviewed-by: Devarsh Thakkar Reviewed-by: Simon Glass Tested-by: Simon Glass # qemu-x86_64 --- V6: - Replace CMD_BMP with BMP. V5: - Added Reviewed-by tag. V4: - No change. V3: - Add separate SPL video and splash configs. - Reviewed-by tag not added due to additional changes in V3. V2: - No change. drivers/video/Kconfig | 223 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 222 insertions(+), 1 deletion(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 60f4a4bf9c..05eaaa767a 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -893,7 +893,7 @@ endif # SPLASH_SCREEN config VIDEO_BMP_GZIP bool "Gzip compressed BMP image support" - depends on CMD_BMP || SPLASH_SCREEN + depends on BMP || SPLASH_SCREEN help If this option is set, additionally to standard BMP images, gzipped BMP images can be displayed via the @@ -930,4 +930,225 @@ config BMP_32BPP endif # VIDEO +config SPL_VIDEO + bool "Enable driver model support for LCD/video" + depends on SPL_DM + help + The video subsystem adds a small amount of overhead to the image. + If this is acceptable and you have a need to use video drivers in + SPL, enable this option. It might provide a cleaner interface to + setting up video within SPL, and allows the same drivers to be + used as U-Boot proper. + +if SPL_VIDEO +source "drivers/video/tidss/Kconfig" + +config SPL_VIDEO_LOGO + bool "Show the U-Boot logo on the display atSPL" + default y if !SPL_SPLASH_SCREEN + select SPL_VIDEO_BMP_RLE8 + help + This enables showing the U-Boot logo on the display when a video + device is probed. It appears at the top right. The logo itself is at + tools/logos/u-boot_logo.bmp and looks best when the display has a + black background. + +config SPL_SPLASH_SCREEN + bool "Show a splash-screen image at SPL" + help + If this option is set, the environment is checked for a variable + "splashimage" at spl stage. + +config SPL_SYS_WHITE_ON_BLACK + bool "Display console as white on a black background at SPL" + help + Normally the display is black on a white background, Enable this + option to invert this, i.e. white on a black background at spl stage. + This can be better in low-light situations or to reduce eye strain in + some cases. + +config SPL_VIDEO_PCI_DEFAULT_FB_SIZE + hex "Default framebuffer size to use if no drivers request it at SPL" + default 0x1000000 if X86 && PCI + default 0 if !(X86 && PCI) + help + Generally, video drivers request the amount of memory they need for + the frame buffer when they are bound, by setting the size field in + struct video_uc_plat. That memory is then reserved for use after + relocation. But PCI drivers cannot be bound before relocation unless + they are mentioned in the devicetree. + + With this value set appropriately, it is possible for PCI video + devices to have a framebuffer allocated by U-Boot. + + Note: the framebuffer needs to be large enough to store all pixels at + maximum resolution. For example, at 1920 x 1200 with 32 bits per + pixel, 2560 * 1600 * 32 / 8 = 0xfa0000 bytes are needed. + +config SPL_CONSOLE_SCROLL_LINES + int "Number of lines to scroll the console by at SPL" + default 1 + help + When the console need to be scrolled, this is the number of + lines to scroll by. It defaults to 1. Increasing this makes the + console jump but can help speed up operation when scrolling + is slow. + +config SPL_CONSOLE_NORMAL + bool "Support a simple text console at SPL" + default y + help + Support drawing text on the frame buffer console so that it can be + used as a console. Rotation is not supported by this driver (see + CONFIG_CONSOLE_ROTATION for that). A built-in 8x16 font is used + for the display. + +config SPL_BACKLIGHT + bool "Enable panel backlight uclass support at SPL" + default y + help + This provides backlight uclass driver that enables basic panel + backlight support. + +config SPL_PANEL + bool "Enable panel uclass support at SPL" + default y + help + This provides panel uclass driver that enables basic panel support. + +config SPL_SIMPLE_PANEL + bool "Enable simple panel support at SPL" + depends on SPL_PANEL && SPL_BACKLIGHT && SPL_DM_GPIO + default y + help + This turns on a simple panel driver that enables a compatible + video panel. + +config SPL_SYS_WHITE_ON_BLACK + bool "Display console as white on a black background at SPL" + help + Normally the display is black on a white background, Enable this + option to invert this, i.e. white on a black background at spl stage. + This can be better in low-light situations or to reduce eye strain in + some cases. + +if SPL_SPLASH_SCREEN + +config SPL_SPLASH_SCREEN_ALIGN + bool "Allow positioning the splash image anywhere on the display at SPL" + help + If this option is set the splash image can be freely positioned + on the screen only at SPL. Environment variable "splashpos" specifies + the position as "x,y". If a positive number is given it is used as + number of pixel from left/top. If a negative number is given it + is used as number of pixel from right/bottom. + +config SPL_SPLASH_SOURCE + bool "Control the source of the splash image at SPL" + help + Use the splash_source.c library. This library provides facilities to + declare board specific splash image locations, routines for loading + splash image from supported locations, and a way of controlling the + selected splash location using the "splashsource" environment + variable. + + This CONFIG works as follows: + + - If splashsource is set to a supported location name as defined by + board code, use that splash location. + - If splashsource is undefined, use the first splash location as + default. + - If splashsource is set to an unsupported value, do not load a splash + screen. + + A splash source location can describe either storage with raw data, a + storage formatted with a file system or a FIT image. In case of a + filesystem, the splash screen data is loaded as a file. The name of + the splash screen file can be controlled with the environment variable + "splashfile". + + To enable loading the splash image from a FIT image, CONFIG_FIT must + be enabled. The FIT image has to start at the 'offset' field address + in the selected splash location. The name of splash image within the + FIT shall be specified by the environment variable "splashfile". + + In case the environment variable "splashfile" is not defined the + default name 'splash.bmp' will be used. + +endif # SPL_SPLASH_SCREEN + +config SPL_VIDEO_BMP_GZIP + bool "Gzip compressed BMP image support at SPL" + depends on SPL_SPLASH_SCREEN || SPL_BMP + help + If this option is set, additionally to standard BMP + images, gzipped BMP images can be displayed via the + splashscreen supportat SPL stage. + +config SPL_VIDEO_LOGO_MAX_SIZE + hex "Maximum size of the bitmap logo in bytes at SPL" + default 0x100000 + help + Sets the maximum uncompressed size of the logo. This is needed when + decompressing a BMP file using the gzip algorithm, since it cannot + read the size from the bitmap header. + +config SPL_VIDEO_BMP_RLE8 + bool "Run length encoded BMP image (RLE8) support at SPL" + help + If this option is set, the 8-bit RLE compressed BMP images + is supported. + +config SPL_BMP_16BPP + bool "16-bit-per-pixel BMP image support at SPL" + help + Support display of bitmaps file with 16-bit-per-pixel + +config SPL_BMP_24BPP + bool "24-bit-per-pixel BMP image support at SPL" + help + Support display of bitmaps file with 24-bit-per-pixel. + +config SPL_BMP_32BPP + bool "32-bit-per-pixel BMP image support at SPL" + help + Support display of bitmaps file with 32-bit-per-pixel. + +config SPL_VIDEO_BPP8 + bool "Support 8-bit-per-pixel displays at SPL" + default y + help + Support drawing text and bitmaps onto a 8-bit-per-pixel display. + Enabling this will include code to support this display. Without + this option, such displays will not be supported and console output + will be empty. + +config SPL_VIDEO_BPP16 + bool "Support 16-bit-per-pixel displays at SPL" + default y + help + Support drawing text and bitmaps onto a 16-bit-per-pixel display. + Enabling this will include code to support this display. Without + this option, such displays will not be supported and console output + will be empty. + +config SPL_VIDEO_BPP32 + bool "Support 32-bit-per-pixel displays at SPL" + default y + help + Support drawing text and bitmaps onto a 32-bit-per-pixel display. + Enabling this will include code to support this display. Without + this option, such displays will not be supported and console output + will be empty. + +config SPL_HIDE_LOGO_VERSION + bool "Hide the version information on the splash screen at SPL" + help + Normally the U-Boot version string is shown on the display when the + splash screen is enabled. This information is not otherwise visible + since video starts up after U-Boot has displayed the initial banner. + + Enable this option to hide this information. +endif + endmenu From patchwork Tue Apr 4 13:05:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764927 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=cj94HZTK; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSjZ4mJdz1yZT for ; Tue, 4 Apr 2023 23:07:46 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2CA9385D37; Tue, 4 Apr 2023 15:06:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="cj94HZTK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4075F85D52; Tue, 4 Apr 2023 15:06:29 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 B067A80A45 for ; Tue, 4 Apr 2023 15:06:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6KV5028839; Tue, 4 Apr 2023 08:06:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613580; bh=g/NeGU6bEQgw7pYDaMV99ICRQPOPKANga+RoREZdpVA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=cj94HZTKO/cllsPmz0FmRgibzdxtmtZvjz3AloWIr4BPkHTE1n8UF1E1UsZ+mF2GH oHhlx08roNvKWUSxxanLoh9yI3L5kxdLhFvvK94s4qVOXY7R+MfNQWm2sG4KZdUGpr TSp27LwJ8EtNFX1g027uYBTx7SmAGPXkpGt8OVOc= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6Klu041097 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:20 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:20 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:20 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6JuG003922; Tue, 4 Apr 2023 08:06:20 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 02/13] drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL Date: Tue, 4 Apr 2023 18:35:59 +0530 Message-ID: <20230404130610.65022-3-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean To enable tidss display driver only at SPL stage, add necessary config, CONFIG_SPL_VIDEO_TIDSS. Signed-off-by: Nikhil M Jain Reviewed-by: Simon Glass Reviewed-by: Devarsh Thakkar --- V6: - Fix commit message. - Add Reviewed-By tag. V5: - No change V4: - Add Reviewed-By tag V3: - No change V2: - No change drivers/video/tidss/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/video/tidss/Kconfig b/drivers/video/tidss/Kconfig index 2a5e56ea4e..95086f3a5d 100644 --- a/drivers/video/tidss/Kconfig +++ b/drivers/video/tidss/Kconfig @@ -16,3 +16,9 @@ menuconfig VIDEO_TIDSS DPI . This option enables these supports which can be used on devices which have OLDI or HDMI display connected. +config SPL_VIDEO_TIDSS + bool "Enable TIDSS video support in SPL Stage" + depends on SPL_VIDEO + help + This options enables tidss driver in SPL stage. If + you need to use tidss at SPL stage use this config. From patchwork Tue Apr 4 13:06:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764926 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=UhlLNg59; 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSj52QjZz1yZT for ; Tue, 4 Apr 2023 23:07:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0D63785E34; Tue, 4 Apr 2023 15:06:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="UhlLNg59"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7EB4185D60; Tue, 4 Apr 2023 15:06:28 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 1186985D52 for ; Tue, 4 Apr 2023 15:06:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6MQA007801; Tue, 4 Apr 2023 08:06:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613582; bh=RIuKdzrjHad9WqJCDrqvTi07dgJWE1sZCkRvjUmibZQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=UhlLNg59E/qJRM3mIIpyoHyFtSBj6gWP6UX9CYN/vZgdgA/BaBzhkzhazIKD4D1am WWJN8kW/OWQvgc8nSSRGbrApc5bZLKKYimhhwOF/NgOm9l+miyfXR8c6GlXl/sgOUj 1g1Xc88Tjvv+A9+4nAgjG/lfSXTaggAwdaDJneHc= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6MXC041104 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:22 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:22 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:21 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6LtG023102; Tue, 4 Apr 2023 08:06:21 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 03/13] drivers: Makefile: Add rule to compile video driver Date: Tue, 4 Apr 2023 18:36:00 +0530 Message-ID: <20230404130610.65022-4-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Compile video driver at SPL using CONFIG_SPL_VIDEO. Signed-off-by: Nikhil M Jain Reviewed-by: Devarsh Thakkar Reviewed-by: Simon Glass Tested-by: Simon Glass # qemu-x86_64 --- V6: - Add Reviewed-by tag - Commit message updated. V5: - Add rule to build video at SPL using CONFIG_SPL_VIDEO and retain obj-y +=video for u-boot proper. V4: - No change V3 (patch introduced): - Add rule to compile video driver at SPL. drivers/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/Makefile b/drivers/Makefile index 58be410135..928a8b0e9d 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -61,6 +61,7 @@ obj-$(CONFIG_SPL_USB_HOST) += usb/host/ obj-$(CONFIG_SPL_SATA) += ata/ scsi/ obj-$(CONFIG_SPL_LEGACY_BLOCK) += block/ obj-$(CONFIG_SPL_THERMAL) += thermal/ +obj-$(CONFIG_SPL_VIDEO) +=video/ endif endif From patchwork Tue Apr 4 13:06:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764929 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=cDEXXz9H; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSkC5L2lz1yZT for ; Tue, 4 Apr 2023 23:08:19 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 18BED85EE4; Tue, 4 Apr 2023 15:07:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="cDEXXz9H"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 27F9380B9E; Tue, 4 Apr 2023 15:06:36 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 24DEA85714 for ; Tue, 4 Apr 2023 15:06:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6Nas097355; Tue, 4 Apr 2023 08:06:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613583; bh=MaMVoCes38bifpom4upUaup0/RLQ8RExWUIqVA1if1g=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=cDEXXz9Huj140PM96L8I5bnfks10O+X1tUO4ds6DbQci466bsNRBacO5i1ia168iz w5otzlfcPxGKwJ7yO8JMOxyXchyQwwnxG8c68NcR0mFP+rZdX5LgDGs+iwOFtHKEQ0 WqLiluDvWZ8bAQ0vuFymT6r4/SlDFiIrTHB7Sp6o= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6NjN039688 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:23 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:23 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:23 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6M5s023110; Tue, 4 Apr 2023 08:06:23 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 04/13] drivers: video: Makefile: Rule to compile necessary video driver files Date: Tue, 4 Apr 2023 18:36:01 +0530 Message-ID: <20230404130610.65022-5-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean To enable video driver at SPL, need to compile video-uclass, vidconsole-uclass, backlight-uclass, panel-uclass, simple-panel, add rules to compile them at SPL and u-boot proper. To support splash_display at SPL, need to compile video-bmp, add rule to compile at SPL and u-boot proper. Signed-off-by: Nikhil M Jain Reviewed-by: Devarsh Thakkar Reviewed-by: Simon Glass Tested-by: Simon Glass # qemu-x86_64 --- V6: - Fix CONFIG_$(SPL_TPL)CONSOLE_NORMAL to CONFIG_$(SPL_TPL_)CONSOLE_NORMAL - Add rule to compile simple_panel at SPL and u-boot proper. V5: - Use $(SPL_TPL_) to check for stage specific configs and compile at specific stages. - Removed ifdef CONFIG_SPL_BUILD V4: - No change V3: - Rule to compile backlight, console and panel files - Not added Reiewed-by tag due to changes V2: - No change drivers/video/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/video/Makefile b/drivers/video/Makefile index cb3f373645..ba2fd41865 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -4,12 +4,12 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. ifdef CONFIG_DM -obj-$(CONFIG_BACKLIGHT) += backlight-uclass.o +obj-$(CONFIG_$(SPL_TPL_)BACKLIGHT) += backlight-uclass.o obj-$(CONFIG_BACKLIGHT_GPIO) += backlight_gpio.o obj-$(CONFIG_BACKLIGHT_PWM) += pwm_backlight.o -obj-$(CONFIG_CONSOLE_NORMAL) += console_normal.o +obj-$(CONFIG_$(SPL_TPL_)CONSOLE_NORMAL) += console_normal.o obj-$(CONFIG_CONSOLE_ROTATION) += console_rotate.o -ifdef CONFIG_CONSOLE_NORMAL +ifdef CONFIG_$(SPL_TPL_)CONSOLE_NORMAL obj-y += console_core.o else ifdef CONFIG_CONSOLE_ROTATION obj-y += console_core.o @@ -18,11 +18,11 @@ obj-$(CONFIG_CONSOLE_ROTATION) += console_core.o obj-$(CONFIG_CONSOLE_TRUETYPE) += console_truetype.o fonts/ obj-$(CONFIG_DISPLAY) += display-uclass.o obj-$(CONFIG_VIDEO_MIPI_DSI) += dsi-host-uclass.o -obj-$(CONFIG_VIDEO) += video-uclass.o vidconsole-uclass.o -obj-$(CONFIG_VIDEO) += video_bmp.o -obj-$(CONFIG_PANEL) += panel-uclass.o +obj-$(CONFIG_$(SPL_TPL_)VIDEO) += video-uclass.o vidconsole-uclass.o +obj-$(CONFIG_$(SPL_TPL_)VIDEO) += video_bmp.o +obj-$(CONFIG_$(SPL_TPL_)PANEL) += panel-uclass.o obj-$(CONFIG_PANEL_HX8238D) += hx8238d.o -obj-$(CONFIG_SIMPLE_PANEL) += simple_panel.o +obj-$(CONFIG_$(SPL_TPL_)SIMPLE_PANEL) += simple_panel.o obj-$(CONFIG_VIDEO_LOGO) += u_boot_logo.o From patchwork Tue Apr 4 13:06:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764935 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=IY8n6N0N; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSm46dy0z1yZT for ; Tue, 4 Apr 2023 23:09:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4662685E3B; Tue, 4 Apr 2023 15:08:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="IY8n6N0N"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CF05E80B9E; Tue, 4 Apr 2023 15:06:44 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 5B6D88594F for ; Tue, 4 Apr 2023 15:06:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6PW3087394; Tue, 4 Apr 2023 08:06:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613585; bh=8kSRu3XctiFsOJ7bO3HqEBbcLxUYqpY2TfZ+lg73LoE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=IY8n6N0NcWflcWMHkBahPctx/ovqRvJrFTchoFv5bk0qLSCxny7rOic1dkw4sY4MZ o64JP/MTcKC0NoA/7gjJFIX/HTUHDuSkUrIGsiFTxHlROSRFWMEWHBunjSI8Hirpzf FFvKQkEstf6xP8NoDgtQ5htTq5jTmts739cYjOOo= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6PKI016164 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:25 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:25 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:25 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6ORW014658; Tue, 4 Apr 2023 08:06:24 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 05/13] drivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL Date: Tue, 4 Apr 2023 18:36:02 +0530 Message-ID: <20230404130610.65022-6-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean To enable TIDSS driver only at SPL stage add rule to compile the TIDSS video driver. CONFIG_$(SPL_)VIDEO_TIDSS will compile tidss_drv, at SPL only if CONFIG_SPL_VIDEO_TIDSS is defined and at u-boot proper if CONFIG_VIDEO_TIDSS is defined. Signed-off-by: Nikhil M Jain Reviewed-by: Simon Glass --- V6: - No change. V5: - Use CONFIG_$(SPL_)VIDEO_TIDSS to build TIDSS driver at SPL and u-boot proper. V4: - Added Reviewed-by tag. V3: - No change. V2: - No change. drivers/video/Makefile | 2 +- drivers/video/tidss/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/Makefile b/drivers/video/Makefile index ba2fd41865..c6a84581fc 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -32,7 +32,7 @@ obj-${CONFIG_EXYNOS_FB} += exynos/ obj-${CONFIG_VIDEO_ROCKCHIP} += rockchip/ obj-${CONFIG_VIDEO_STM32} += stm32/ obj-${CONFIG_VIDEO_TEGRA124} += tegra124/ -obj-${CONFIG_VIDEO_TIDSS} += tidss/ +obj-${CONFIG_$(SPL_)VIDEO_TIDSS} += tidss/ obj-y += ti/ obj-$(CONFIG_ATMEL_HLCD) += atmel_hlcdfb.o diff --git a/drivers/video/tidss/Makefile b/drivers/video/tidss/Makefile index f4f8c6c470..a29cee2a41 100644 --- a/drivers/video/tidss/Makefile +++ b/drivers/video/tidss/Makefile @@ -9,4 +9,4 @@ # Author: Tomi Valkeinen -obj-${CONFIG_VIDEO_TIDSS} = tidss_drv.o +obj-${CONFIG_$(SPL_)VIDEO_TIDSS} = tidss_drv.o From patchwork Tue Apr 4 13:06:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764930 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=Xv4oHE1M; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSkY4htpz1yZT for ; Tue, 4 Apr 2023 23:08:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 888E685EC9; Tue, 4 Apr 2023 15:07:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="Xv4oHE1M"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7897185EA2; Tue, 4 Apr 2023 15:06: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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 6653185D7C for ; Tue, 4 Apr 2023 15:06:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6QIC007812; Tue, 4 Apr 2023 08:06:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613586; bh=Bo2c6imwVRaJmXTBwkqhsgsgU1KOBRqvWm43wbvbDDQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Xv4oHE1MwsyUi/valLegK7GvneUhxhNRJaYJJLrA7tHRilgcSno/qMRfdq1lofcji GgIsWRZPbkewXfPVhwr7hvdVQHJ+x8F7Ly/r2zUhNXmarb4PpGw+2HoWLJ46zMXjfn Eq4BtM9KOPSOteYVGIJazhatAh/6yT+XirxNEjRE= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6QCv041126 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:26 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:26 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:26 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6PNG014674; Tue, 4 Apr 2023 08:06:26 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 06/13] common: Makefile: Add rule to compile splash and splash_source at SPL Date: Tue, 4 Apr 2023 18:36:03 +0530 Message-ID: <20230404130610.65022-7-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean To enable splash screen and loading bmp from boot media, add rules to compile splash.c and splash_source.c at SPL stage only when CONFIG_SPL_SPLASH_SCREEN and CONFIG_SPL_SPLASH_SOURCE are defined. Signed-off-by: Nikhil M Jain Reviewed-by: Devarsh Thakkar Reviewed-by: Simon Glass --- V6: - Add Reviewed-by tag. V5: - No change V4: - No change V3 (patch introduced): - Rule to compile splash.c and splash_source.c. common/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/Makefile b/common/Makefile index a50302d8b5..3a6ca337e0 100644 --- a/common/Makefile +++ b/common/Makefile @@ -56,6 +56,8 @@ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o obj-$(CONFIG_SPL_USB_HOST) += usb.o usb_hub.o obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o obj-$(CONFIG_SPL_MUSB_NEW) += usb.o +obj-$(CONFIG_SPL_SPLASH_SCREEN) += splash.o +obj-$(CONFIG_SPL_SPLASH_SOURCE) += splash_source.o endif # CONFIG_SPL_BUILD #others From patchwork Tue Apr 4 13:06:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764934 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=VxtRn+Tn; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSlg4tN7z1yZT for ; Tue, 4 Apr 2023 23:09:35 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AE83585F0E; Tue, 4 Apr 2023 15:07:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="VxtRn+Tn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EB5BB80A45; Tue, 4 Apr 2023 15:06:46 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 819C585C31 for ; Tue, 4 Apr 2023 15:06:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6SBI097363; Tue, 4 Apr 2023 08:06:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613588; bh=WLRkwY/X74DfnAo7Y43D89lZGkv8DLoT8R27C8e+1Uo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=VxtRn+TnIoxB6+sAItRahWwmbGsKwhYF88LGJFQn0z0MppdJYq1brlKbc7jHsxs1Z LnaliIuwIysoFYDxD1mC7Ca9i125qvP+Mttd1UnvT9W9QkRg0eAjHutf+D/U1Vane4 CfsikuWXMr8RgeQg7c9dzDW3bRBqOfblHVGVm2mA= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6SH5016175 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:28 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:27 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:27 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6Rpf023147; Tue, 4 Apr 2023 08:06:27 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 07/13] common: Kconfig: Add BMP configs Date: Tue, 4 Apr 2023 18:36:04 +0530 Message-ID: <20230404130610.65022-8-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Add CONFIG_BMP and CONFIG_SPL_BMP which enable displaying bmp images at u-boot proper and SPL. Signed-off-by: Nikhil M Jain Reviewed-by: Simon Glass Reviewed-by: Devarsh Thakkar --- V6: - Added Reviewed-by tag. V5: - Added Reviewed-by tag. V4: - No change. V3 (patch introduced): - Add CONFIG BMP and SPL_BMP. common/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/Kconfig b/common/Kconfig index 7ff62552cb..7329dc8253 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1154,3 +1154,15 @@ config FDT_SIMPLEFB config IO_TRACE bool + +config BMP + bool "Enable bmp image display" + default y if CMD_BMP + help + Enable bmp functions to display bmp image and get bmp info. + +config SPL_BMP + bool "Enable bmp image display at SPL" + depends on SPL_VIDEO + help + Enable bmp functions to display bmp image and get bmp info at SPL. From patchwork Tue Apr 4 13:06:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764933 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=XNnB3Wue; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSlL1zDqz1yZT for ; Tue, 4 Apr 2023 23:09:18 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ADCE285F12; Tue, 4 Apr 2023 15:07:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="XNnB3Wue"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 49B2D85DF4; Tue, 4 Apr 2023 15:06:49 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 4F3C185D37 for ; Tue, 4 Apr 2023 15:06:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6TIs097368; Tue, 4 Apr 2023 08:06:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613589; bh=cBtnYx9VfX+XJHQWz2SZoob8NhVskHkAnT/mIrBGSFs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=XNnB3Wue/RcrAzYmthGJuNoM71TMoohWtOxWHfeR2qEo5ujNDHII8N3VyABJAeCfd 2StQbZZhGaCJunfdeHFPUkxpjSrxbqpHz1Gx8V/8xlF4kqUIjb6vNhSLVsG6y9L1CH SMN0FSYRSw+/RdPY7vJ5ZdjatSczrNSInBv88QEM= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6T3E039725 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:29 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:29 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:29 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6SGR023162; Tue, 4 Apr 2023 08:06:29 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 08/13] cmd: bmp: Split bmp commands and functions Date: Tue, 4 Apr 2023 18:36:05 +0530 Message-ID: <20230404130610.65022-9-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean To enable splash screen at SPL, need to compile cmd/bmp.c which also includes bmp commands, since SPL doesn't use commands split bmp.c into common/bmp.c which includes all bmp functions and cmd/bmp.c which only contains bmp commands. Add function delclaration for bmp_info in video.h. Signed-off-by: Nikhil M Jain Reviewed-by: Simon Glass --- V6: - Fix commit message. - Remove unused header files. V5: - Rename cmd/bmp_cmd to cmd/bmp. V4: - No change. V3 (patch introduced): - Split bmp functions and commands. cmd/bmp.c | 162 +----------------------------------------------- common/bmp.c | 152 +++++++++++++++++++++++++++++++++++++++++++++ include/video.h | 7 +++ 3 files changed, 161 insertions(+), 160 deletions(-) create mode 100644 common/bmp.c diff --git a/cmd/bmp.c b/cmd/bmp.c index 46d0d916e8..8f43a40daf 100644 --- a/cmd/bmp.c +++ b/cmd/bmp.c @@ -9,84 +9,12 @@ */ #include -#include #include -#include -#include #include -#include -#include #include #include #include -#include - -static int bmp_info (ulong addr); - -/* - * Allocate and decompress a BMP image using gunzip(). - * - * Returns a pointer to the decompressed image data. This pointer is - * aligned to 32-bit-aligned-address + 2. - * See doc/README.displaying-bmps for explanation. - * - * The allocation address is passed to 'alloc_addr' and must be freed - * by the caller after use. - * - * Returns NULL if decompression failed, or if the decompressed data - * didn't contain a valid BMP signature. - */ -#ifdef CONFIG_VIDEO_BMP_GZIP -struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, - void **alloc_addr) -{ - void *dst; - unsigned long len; - struct bmp_image *bmp; - - /* - * Decompress bmp image - */ - len = CONFIG_VIDEO_LOGO_MAX_SIZE; - /* allocate extra 3 bytes for 32-bit-aligned-address + 2 alignment */ - dst = malloc(CONFIG_VIDEO_LOGO_MAX_SIZE + 3); - if (!dst) { - puts("Error: malloc in gunzip failed!\n"); - return NULL; - } - - /* align to 32-bit-aligned-address + 2 */ - bmp = dst + 2; - - if (gunzip(bmp, CONFIG_VIDEO_LOGO_MAX_SIZE, map_sysmem(addr, 0), - &len)) { - free(dst); - return NULL; - } - if (len == CONFIG_VIDEO_LOGO_MAX_SIZE) - puts("Image could be truncated (increase CONFIG_VIDEO_LOGO_MAX_SIZE)!\n"); - - /* - * Check for bmp mark 'BM' - */ - if (!((bmp->header.signature[0] == 'B') && - (bmp->header.signature[1] == 'M'))) { - free(dst); - return NULL; - } - - debug("Gzipped BMP image detected!\n"); - - *alloc_addr = dst; - return bmp; -} -#else -struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, - void **alloc_addr) -{ - return NULL; -} -#endif +#include static int do_bmp_info(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) @@ -137,7 +65,7 @@ static int do_bmp_display(struct cmd_tbl *cmdtp, int flag, int argc, return CMD_RET_USAGE; } - return (bmp_display(addr, x, y)); + return (bmp_display(addr, x, y)); } static struct cmd_tbl cmd_bmp_sub[] = { @@ -145,22 +73,6 @@ static struct cmd_tbl cmd_bmp_sub[] = { U_BOOT_CMD_MKENT(display, 5, 0, do_bmp_display, "", ""), }; -#ifdef CONFIG_NEEDS_MANUAL_RELOC -void bmp_reloc(void) { - fixup_cmdtable(cmd_bmp_sub, ARRAY_SIZE(cmd_bmp_sub)); -} -#endif - -/* - * Subroutine: do_bmp - * - * Description: Handler for 'bmp' command.. - * - * Inputs: argv[1] contains the subcommand - * - * Return: None - * - */ static int do_bmp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct cmd_tbl *c; @@ -183,73 +95,3 @@ U_BOOT_CMD( "info - display image info\n" "bmp display [x y] - display image at x,y" ); - -/* - * Subroutine: bmp_info - * - * Description: Show information about bmp file in memory - * - * Inputs: addr address of the bmp file - * - * Return: None - * - */ -static int bmp_info(ulong addr) -{ - struct bmp_image *bmp = (struct bmp_image *)map_sysmem(addr, 0); - void *bmp_alloc_addr = NULL; - unsigned long len; - - if (!((bmp->header.signature[0]=='B') && - (bmp->header.signature[1]=='M'))) - bmp = gunzip_bmp(addr, &len, &bmp_alloc_addr); - - if (bmp == NULL) { - printf("There is no valid bmp file at the given address\n"); - return 1; - } - - printf("Image size : %d x %d\n", le32_to_cpu(bmp->header.width), - le32_to_cpu(bmp->header.height)); - printf("Bits per pixel: %d\n", le16_to_cpu(bmp->header.bit_count)); - printf("Compression : %d\n", le32_to_cpu(bmp->header.compression)); - - if (bmp_alloc_addr) - free(bmp_alloc_addr); - - return(0); -} - -int bmp_display(ulong addr, int x, int y) -{ - struct udevice *dev; - int ret; - struct bmp_image *bmp = map_sysmem(addr, 0); - void *bmp_alloc_addr = NULL; - unsigned long len; - - if (!((bmp->header.signature[0]=='B') && - (bmp->header.signature[1]=='M'))) - bmp = gunzip_bmp(addr, &len, &bmp_alloc_addr); - - if (!bmp) { - printf("There is no valid bmp file at the given address\n"); - return 1; - } - addr = map_to_sysmem(bmp); - - ret = uclass_first_device_err(UCLASS_VIDEO, &dev); - if (!ret) { - bool align = false; - - if (x == BMP_ALIGN_CENTER || y == BMP_ALIGN_CENTER) - align = true; - - ret = video_bmp_display(dev, addr, x, y, align); - } - - if (bmp_alloc_addr) - free(bmp_alloc_addr); - - return ret ? CMD_RET_FAILURE : 0; -} diff --git a/common/bmp.c b/common/bmp.c new file mode 100644 index 0000000000..6134ada5a7 --- /dev/null +++ b/common/bmp.c @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2002 + * Detlev Zundel, DENX Software Engineering, dzu@denx.de. + */ + +/* + * BMP handling routines + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Allocate and decompress a BMP image using gunzip(). + * + * Returns a pointer to the decompressed image data. This pointer is + * aligned to 32-bit-aligned-address + 2. + * See doc/README.displaying-bmps for explanation. + * + * The allocation address is passed to 'alloc_addr' and must be freed + * by the caller after use. + * + * Returns NULL if decompression failed, or if the decompressed data + * didn't contain a valid BMP signature. + */ +#ifdef CONFIG_VIDEO_BMP_GZIP +struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, + void **alloc_addr) +{ + void *dst; + unsigned long len; + struct bmp_image *bmp; + + /* + * Decompress bmp image + */ + len = CONFIG_VIDEO_LOGO_MAX_SIZE; + /* allocate extra 3 bytes for 32-bit-aligned-address + 2 alignment */ + dst = malloc(CONFIG_VIDEO_LOGO_MAX_SIZE + 3); + if (!dst) { + puts("Error: malloc in gunzip failed!\n"); + return NULL; + } + + /* align to 32-bit-aligned-address + 2 */ + bmp = dst + 2; + + if (gunzip(bmp, CONFIG_VIDEO_LOGO_MAX_SIZE, map_sysmem(addr, 0), + &len)) { + free(dst); + return NULL; + } + if (len == CONFIG_VIDEO_LOGO_MAX_SIZE) + puts("Image could be truncated (increase CONFIG_VIDEO_LOGO_MAX_SIZE)!\n"); + + /* + * Check for bmp mark 'BM' + */ + if (!((bmp->header.signature[0] == 'B') && + (bmp->header.signature[1] == 'M'))) { + free(dst); + return NULL; + } + + debug("Gzipped BMP image detected!\n"); + + *alloc_addr = dst; + return bmp; +} +#else +struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, + void **alloc_addr) +{ + return NULL; +} +#endif + + +#ifdef CONFIG_NEEDS_MANUAL_RELOC +void bmp_reloc(void) { + fixup_cmdtable(cmd_bmp_sub, ARRAY_SIZE(cmd_bmp_sub)); +} +#endif + +int bmp_info(ulong addr) +{ + struct bmp_image *bmp = (struct bmp_image *)map_sysmem(addr, 0); + void *bmp_alloc_addr = NULL; + unsigned long len; + + if (!((bmp->header.signature[0]=='B') && + (bmp->header.signature[1]=='M'))) + bmp = gunzip_bmp(addr, &len, &bmp_alloc_addr); + + if (bmp == NULL) { + printf("There is no valid bmp file at the given address\n"); + return 1; + } + + printf("Image size : %d x %d\n", le32_to_cpu(bmp->header.width), + le32_to_cpu(bmp->header.height)); + printf("Bits per pixel: %d\n", le16_to_cpu(bmp->header.bit_count)); + printf("Compression : %d\n", le32_to_cpu(bmp->header.compression)); + + if (bmp_alloc_addr) + free(bmp_alloc_addr); + + return(0); +} + +int bmp_display(ulong addr, int x, int y) +{ + struct udevice *dev; + int ret; + struct bmp_image *bmp = map_sysmem(addr, 0); + void *bmp_alloc_addr = NULL; + unsigned long len; + + if (!((bmp->header.signature[0]=='B') && + (bmp->header.signature[1]=='M'))) + bmp = gunzip_bmp(addr, &len, &bmp_alloc_addr); + + if (!bmp) { + printf("There is no valid bmp file at the given address\n"); + return 1; + } + addr = map_to_sysmem(bmp); + + ret = uclass_first_device_err(UCLASS_VIDEO, &dev); + if (!ret) { + bool align = false; + + if (x == BMP_ALIGN_CENTER || y == BMP_ALIGN_CENTER) + align = true; + + ret = video_bmp_display(dev, addr, x, y, align); + } + + if (bmp_alloc_addr) + free(bmp_alloc_addr); + + return ret ? CMD_RET_FAILURE : 0; +} diff --git a/include/video.h b/include/video.h index 4d99e5dc27..b38fb9081a 100644 --- a/include/video.h +++ b/include/video.h @@ -357,4 +357,11 @@ void *video_get_u_boot_logo(void); */ int bmp_display(ulong addr, int x, int y); +/* + * bmp_info() - Show information about bmp file + * + * @addr: address of bmp file + */ +int bmp_info(ulong addr); + #endif From patchwork Tue Apr 4 13:06:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764937 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=iXAvVZTX; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSmm4RYdz1yZQ for ; Tue, 4 Apr 2023 23:10:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B3B8885EE3; Tue, 4 Apr 2023 15:08:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="iXAvVZTX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6AA5F85D99; Tue, 4 Apr 2023 15:06:51 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 74061854CF for ; Tue, 4 Apr 2023 15:06:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6VgN028856; Tue, 4 Apr 2023 08:06:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613591; bh=42s1bjn4wetvwf6QTqNMBOHFz+bHqdH2cLB2XD5kGWk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=iXAvVZTX0xIuWK0GJXQI/OR5HF8TL8jqJYE4k26R6r6I9BSe52Vt8zV21wg/mDjS6 4/bzgAp/MSX4hbnwwAUs5Hwsn6mYZpbvSCnqyS6Zf3ZU+UGsiwtx+Duynu4FZEyMuY YWapXqtqXApQ2A268foVUevf6mausTuQ9Sj2Z9+w= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6V3a016188 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:31 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:30 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:30 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6UdT004014; Tue, 4 Apr 2023 08:06:30 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 09/13] common: Makefile: Rule to compile bmp.c Date: Tue, 4 Apr 2023 18:36:06 +0530 Message-ID: <20230404130610.65022-10-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Add rule to compile bmp.c at SPL and u-boot proper when CONFIG_SPL_BMP and CONFIG_BMP are defined. Signed-off-by: Nikhil M Jain Reviewed-by: Devarsh Thakkar Reviewed-by: Simon Glass Tested-by: Simon Glass # qemu-x86_64 --- V6: - Add Reviewed-by tag. V5: - Remove obj-y+= read.o. V4: - No change. V3 (patch introduced): - Rule to compile common/bmp. common/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/common/Makefile b/common/Makefile index 3a6ca337e0..c87bb2e78b 100644 --- a/common/Makefile +++ b/common/Makefile @@ -45,6 +45,7 @@ endif # !CONFIG_SPL_BUILD obj-$(CONFIG_$(SPL_TPL_)BOOTSTAGE) += bootstage.o obj-$(CONFIG_$(SPL_TPL_)BLOBLIST) += bloblist.o +obj-$(CONFIG_$(SPL_)BMP) += bmp.o ifdef CONFIG_SPL_BUILD ifdef CONFIG_SPL_DFU From patchwork Tue Apr 4 13:06:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764938 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=GoTTQvV6; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSn35tc8z1yZQ for ; Tue, 4 Apr 2023 23:10:47 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4C98B85F66; Tue, 4 Apr 2023 15:08:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="GoTTQvV6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 99A5780A45; Tue, 4 Apr 2023 15:06:57 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 48F8985E8E for ; Tue, 4 Apr 2023 15:06:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6Wve087419; Tue, 4 Apr 2023 08:06:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613592; bh=v+bOpBsFmr8Dy8l6HzDjBmrH7Ko1mHBHfIasa0wcaks=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GoTTQvV69NUOmzOdMmYJVXqAISEYeLkzRBL+SBoD9PgvC8YtAcW5uTrk18WZTkdft 0swmQHUNVyNOGRT8aqDeWnDZaV6RnREtkazNK5j0xajpv3Mr2nvLCbkghzJBlYtMeo boFkwrg9FLAQgHMowN1FP3XuHnMi3ZRejSMqJoqs= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6WKv074812 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:32 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:32 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:32 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6V6I014733; Tue, 4 Apr 2023 08:06:32 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 10/13] drivers: video: Enable necessary video functions at SPL Date: Tue, 4 Apr 2023 18:36:07 +0530 Message-ID: <20230404130610.65022-11-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean To support video driver at SPL use CONFIG_IS_ENABLED and CONFIG_VAL, which checks for stage specific configs and thus enables video support at respective stage. Signed-off-by: Nikhil M Jain Reviewed-by: Devarsh Thakkar Reviewed-by: Simon Glass Tested-by: Simon Glass # qemu-x86_64 --- V6: - No change. V5: - Add Reviewed-By tag. - Use COFIG_IS_ENABLED in console_core in place of console_normal. V4: - No change. V3 (patch introduced): - Enable necessary video functions at SPL. drivers/video/console_core.c | 6 +++--- drivers/video/vidconsole-uclass.c | 2 +- drivers/video/video-uclass.c | 14 +++++++------- drivers/video/video_bmp.c | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/video/console_core.c b/drivers/video/console_core.c index d4f79c656a..1f93b1b85f 100644 --- a/drivers/video/console_core.c +++ b/drivers/video/console_core.c @@ -46,11 +46,11 @@ static int console_set_font(struct udevice *dev, struct video_fontdata *fontdata int check_bpix_support(int bpix) { - if (bpix == VIDEO_BPP8 && IS_ENABLED(CONFIG_VIDEO_BPP8)) + if (bpix == VIDEO_BPP8 && CONFIG_IS_ENABLED(VIDEO_BPP8)) return 0; - else if (bpix == VIDEO_BPP16 && IS_ENABLED(CONFIG_VIDEO_BPP16)) + else if (bpix == VIDEO_BPP16 && CONFIG_IS_ENABLED(VIDEO_BPP16)) return 0; - else if (bpix == VIDEO_BPP32 && IS_ENABLED(CONFIG_VIDEO_BPP32)) + else if (bpix == VIDEO_BPP32 && CONFIG_IS_ENABLED(VIDEO_BPP32)) return 0; else return -ENOSYS; diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index 1225de2333..a21fde0e1d 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -86,7 +86,7 @@ static void vidconsole_newline(struct udevice *dev) struct vidconsole_priv *priv = dev_get_uclass_priv(dev); struct udevice *vid_dev = dev->parent; struct video_priv *vid_priv = dev_get_uclass_priv(vid_dev); - const int rows = CONFIG_CONSOLE_SCROLL_LINES; + const int rows = CONFIG_VAL(CONSOLE_SCROLL_LINES); int i, ret; priv->xcur_frac = priv->xstart_frac; diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index da89f43144..8396bdfb11 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -132,7 +132,7 @@ int video_reserve(ulong *addrp) /* Allocate space for PCI video devices in case there were not bound */ if (*addrp == gd->video_top) - *addrp -= CONFIG_VIDEO_PCI_DEFAULT_FB_SIZE; + *addrp -= CONFIG_VAL(VIDEO_PCI_DEFAULT_FB_SIZE); gd->video_bottom = *addrp; gd->fb_base = *addrp; @@ -149,7 +149,7 @@ int video_fill(struct udevice *dev, u32 colour) switch (priv->bpix) { case VIDEO_BPP16: - if (IS_ENABLED(CONFIG_VIDEO_BPP16)) { + if (CONFIG_IS_ENABLED(VIDEO_BPP16)) { u16 *ppix = priv->fb; u16 *end = priv->fb + priv->fb_size; @@ -158,7 +158,7 @@ int video_fill(struct udevice *dev, u32 colour) break; } case VIDEO_BPP32: - if (IS_ENABLED(CONFIG_VIDEO_BPP32)) { + if (CONFIG_IS_ENABLED(VIDEO_BPP32)) { u32 *ppix = priv->fb; u32 *end = priv->fb + priv->fb_size; @@ -212,14 +212,14 @@ u32 video_index_to_colour(struct video_priv *priv, unsigned int idx) { switch (priv->bpix) { case VIDEO_BPP16: - if (IS_ENABLED(CONFIG_VIDEO_BPP16)) { + if (CONFIG_IS_ENABLED(VIDEO_BPP16)) { return ((colours[idx].r >> 3) << 11) | ((colours[idx].g >> 2) << 5) | ((colours[idx].b >> 3) << 0); } break; case VIDEO_BPP32: - if (IS_ENABLED(CONFIG_VIDEO_BPP32)) { + if (CONFIG_IS_ENABLED(VIDEO_BPP32)) { if (priv->format == VIDEO_X2R10G10B10) return (colours[idx].r << 22) | (colours[idx].g << 12) | @@ -513,8 +513,8 @@ static int video_post_probe(struct udevice *dev) return ret; } - if (IS_ENABLED(CONFIG_VIDEO_LOGO) && - !IS_ENABLED(CONFIG_SPLASH_SCREEN) && !plat->hide_logo) { + if (CONFIG_IS_ENABLED(VIDEO_LOGO) && + !CONFIG_IS_ENABLED(SPLASH_SCREEN) && !plat->hide_logo) { ret = show_splash(dev); if (ret) { log_debug("Cannot show splash screen\n"); diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c index 6188a13e44..47e52c4f69 100644 --- a/drivers/video/video_bmp.c +++ b/drivers/video/video_bmp.c @@ -320,7 +320,7 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, switch (bmp_bpix) { case 1: case 8: - if (IS_ENABLED(CONFIG_VIDEO_BMP_RLE8)) { + if (CONFIG_IS_ENABLED(VIDEO_BMP_RLE8)) { u32 compression = get_unaligned_le32( &bmp->header.compression); debug("compressed %d %d\n", compression, BMP_BI_RLE8); @@ -348,7 +348,7 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, } break; case 16: - if (IS_ENABLED(CONFIG_BMP_16BPP)) { + if (CONFIG_IS_ENABLED(BMP_16BPP)) { for (i = 0; i < height; ++i) { schedule(); for (j = 0; j < width; j++) { @@ -361,7 +361,7 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, } break; case 24: - if (IS_ENABLED(CONFIG_BMP_24BPP)) { + if (CONFIG_IS_ENABLED(BMP_24BPP)) { for (i = 0; i < height; ++i) { for (j = 0; j < width; j++) { if (bpix == 16) { @@ -395,7 +395,7 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, } break; case 32: - if (IS_ENABLED(CONFIG_BMP_32BPP)) { + if (CONFIG_IS_ENABLED(BMP_32BPP)) { for (i = 0; i < height; ++i) { for (j = 0; j < width; j++) { if (eformat == VIDEO_X2R10G10B10) { From patchwork Tue Apr 4 13:06:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764931 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=or+3NCOw; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSkv3DGWz1yZT for ; Tue, 4 Apr 2023 23:08:55 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DB1D585F0D; Tue, 4 Apr 2023 15:07:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="or+3NCOw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 223F68594F; Tue, 4 Apr 2023 15:06:46 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 AED5C85D52 for ; Tue, 4 Apr 2023 15:06:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6Y7G007842; Tue, 4 Apr 2023 08:06:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613594; bh=IJ/l4KQNiJCt2qev9eGzoDWTjuM2RLlTfQl+I/xvwY8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=or+3NCOwf4kUTgXrY0MRefSbpO9QZGZhCm82sQEGl159Vzo74Ckz3TfX55IYTgsQK aG9fFaTy4skLhtUlV5Y6IlRf4sAEjbgzadYqrRmBfKASvlgnqO8XBgQQmoJgvML3OR vslxgArkiKrrJLy8Op8c5rLh91+w4UcgLnT9PeEs= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6YmB039756 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:34 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:33 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:33 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6WIr023235; Tue, 4 Apr 2023 08:06:33 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 11/13] common: Enable splash functions at SPL Date: Tue, 4 Apr 2023 18:36:08 +0530 Message-ID: <20230404130610.65022-12-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean To support splash screen at both u-boot proper and SPL use CONFIG_IS_ENABLED and CONFIG_VAL to check for video related Kconfigs at respective stages. Replace CONFIG_CMD_BMP with CONFIG_BMP to enable splash_display function at u-boot proper and SPL. Signed-off-by: Nikhil M Jain Reviewed-by: Devarsh Thakkar Reviewed-by: Simon Glass --- V6: - Fix commit message. - Add Reviewed-by tag. V5: - Replace CONFIG_CMD_BMP with CONFIG_BMP. V4: - No change V3 (patch introduced): - Enable splash functions at SPL common/bmp.c | 10 +++++----- common/splash.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common/bmp.c b/common/bmp.c index 6134ada5a7..c54c4ca63d 100644 --- a/common/bmp.c +++ b/common/bmp.c @@ -32,7 +32,7 @@ * Returns NULL if decompression failed, or if the decompressed data * didn't contain a valid BMP signature. */ -#ifdef CONFIG_VIDEO_BMP_GZIP +#if CONFIG_IS_ENABLED(VIDEO_BMP_GZIP) struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, void **alloc_addr) { @@ -43,9 +43,9 @@ struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, /* * Decompress bmp image */ - len = CONFIG_VIDEO_LOGO_MAX_SIZE; + len = CONFIG_VAL(VIDEO_LOGO_MAX_SIZE); /* allocate extra 3 bytes for 32-bit-aligned-address + 2 alignment */ - dst = malloc(CONFIG_VIDEO_LOGO_MAX_SIZE + 3); + dst = malloc(CONFIG_VAL(VIDEO_LOGO_MAX_SIZE) + 3); if (!dst) { puts("Error: malloc in gunzip failed!\n"); return NULL; @@ -54,12 +54,12 @@ struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp, /* align to 32-bit-aligned-address + 2 */ bmp = dst + 2; - if (gunzip(bmp, CONFIG_VIDEO_LOGO_MAX_SIZE, map_sysmem(addr, 0), + if (gunzip(bmp, CONFIG_VAL(VIDEO_LOGO_MAX_SIZE), map_sysmem(addr, 0), &len)) { free(dst); return NULL; } - if (len == CONFIG_VIDEO_LOGO_MAX_SIZE) + if (len == CONFIG_VAL(VIDEO_LOGO_MAX_SIZE)) puts("Image could be truncated (increase CONFIG_VIDEO_LOGO_MAX_SIZE)!\n"); /* diff --git a/common/splash.c b/common/splash.c index 4bc54b1bf9..89bb9a6a20 100644 --- a/common/splash.c +++ b/common/splash.c @@ -89,14 +89,14 @@ static inline int splash_video_logo_load(void) { return -ENOSYS; } __weak int splash_screen_prepare(void) { - if (IS_ENABLED(CONFIG_SPLASH_SOURCE)) + if (CONFIG_IS_ENABLED(SPLASH_SOURCE)) return splash_source_load(default_splash_locations, ARRAY_SIZE(default_splash_locations)); return splash_video_logo_load(); } -#ifdef CONFIG_SPLASH_SCREEN_ALIGN +#if CONFIG_IS_ENABLED(SPLASH_SCREEN_ALIGN) void splash_get_pos(int *x, int *y) { char *s = env_get("splashpos"); @@ -119,7 +119,7 @@ void splash_get_pos(int *x, int *y) } #endif /* CONFIG_SPLASH_SCREEN_ALIGN */ -#if defined(CONFIG_VIDEO) && !defined(CONFIG_HIDE_LOGO_VERSION) +#if CONFIG_IS_ENABLED(VIDEO) && !CONFIG_IS_ENABLED(HIDE_LOGO_VERSION) #ifdef CONFIG_VIDEO_LOGO #include @@ -159,7 +159,7 @@ void splash_display_banner(void) * Common function to show a splash image if env("splashimage") is set. * For additional details please refer to doc/README.splashprepare. */ -#if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_CMD_BMP) +#if CONFIG_IS_ENABLED(SPLASH_SCREEN) && CONFIG_IS_ENABLED(BMP) int splash_display(void) { ulong addr; @@ -183,7 +183,7 @@ int splash_display(void) if (x || y) goto end; -#if defined(CONFIG_VIDEO) && !defined(CONFIG_HIDE_LOGO_VERSION) +#if CONFIG_IS_ENABLED(VIDEO) && CONFIG_IS_ENABLED(HIDE_LOGO_VERSION) splash_display_banner(); #endif end: From patchwork Tue Apr 4 13:06:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764939 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=oKnMSUuc; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSnL5tPJz1yZQ for ; Tue, 4 Apr 2023 23:11:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BEB4985F44; Tue, 4 Apr 2023 15:08:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="oKnMSUuc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1C79585DCE; Tue, 4 Apr 2023 15:06:59 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 3EAE885E73 for ; Tue, 4 Apr 2023 15:06:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6ZHu087433; Tue, 4 Apr 2023 08:06:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613595; bh=zYsCFYCzGVhx//qfCQAVyb3n5wkKgn7QYN20g8Y0yg4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=oKnMSUuczh6YXYvkn7RzOLA+Iwt0/2OINB00RSVx0MPbksuEgX1nULuIyYtEcNxJm Ppmy+ZE/q2/GhuVhPJ/5boK3RHEXFDDonaUowLLRNGb57NNwJwqB5uK7C6v2Dr7JeD HjWfHir7vmP00gzWWCFsbGEIZmcfK+PFKe/2vsnA= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6Zd5039763 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:35 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:35 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:35 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6Ytt014769; Tue, 4 Apr 2023 08:06:34 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 12/13] include: Enable video related global data variable and splash at SPL Date: Tue, 4 Apr 2023 18:36:09 +0530 Message-ID: <20230404130610.65022-13-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean To include video related global data variables and splash functions at SPL and u-boot proper, use CONFIG_IS_ENABLED. Replace CONFIG_CMD_BMP with CONFIG_BMP to enable splash_display function at u-boot proper and SPL. Signed-off-by: Nikhil M Jain Reviewed-by: Devarsh Thakkar Reviewed-by: Simon Glass --- V6: - Fix commit message. - Add Reviewed-by tag. V5: - Replace CONFIG_CMD_BMP with CONFIG_BMP. V4: - No change V3 (patch introduced): - Enable splash functions at SPL include/asm-generic/global_data.h | 4 ++-- include/splash.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 987fb66c17..65bf8df1e5 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -68,7 +68,7 @@ struct global_data { * @mem_clk: memory clock rate in Hz */ unsigned long mem_clk; -#if defined(CONFIG_VIDEO) +#if CONFIG_IS_ENABLED(VIDEO) /** * @fb_base: base address of frame buffer memory */ @@ -359,7 +359,7 @@ struct global_data { */ struct membuff console_in; #endif -#ifdef CONFIG_VIDEO +#if CONFIG_IS_ENABLED(VIDEO) /** * @video_top: top of video frame buffer area */ diff --git a/include/splash.h b/include/splash.h index 33e45e6941..b6a100ffc3 100644 --- a/include/splash.h +++ b/include/splash.h @@ -49,7 +49,7 @@ struct splash_location { char *ubivol; /* UBI volume-name for ubifsmount */ }; -#ifdef CONFIG_SPLASH_SOURCE +#if CONFIG_IS_ENABLED(SPLASH_SOURCE) int splash_source_load(struct splash_location *locations, uint size); #else static inline int splash_source_load(struct splash_location *locations, @@ -61,13 +61,13 @@ static inline int splash_source_load(struct splash_location *locations, int splash_screen_prepare(void); -#ifdef CONFIG_SPLASH_SCREEN_ALIGN +#if CONFIG_IS_ENABLED(SPLASH_SCREEN_ALIGN) void splash_get_pos(int *x, int *y); #else static inline void splash_get_pos(int *x, int *y) { } #endif -#if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_CMD_BMP) +#if CONFIG_IS_ENABLED(SPLASH_SCREEN) && CONFIG_IS_ENABLED(BMP) int splash_display(void); #else static inline int splash_display(void) From patchwork Tue Apr 4 13:06:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1764936 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=TpngP+a6; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrSmT3cxYz1yZQ for ; Tue, 4 Apr 2023 23:10:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BE1D385DAA; Tue, 4 Apr 2023 15:08:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="TpngP+a6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5805A85C6D; Tue, 4 Apr 2023 15:06:49 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 1E28E85E53 for ; Tue, 4 Apr 2023 15:06:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 334D6agE028872; Tue, 4 Apr 2023 08:06:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680613596; bh=2YEvceBqUsly86lFYbulfxiYgB7PbH2OJqeGXzPDp/A=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=TpngP+a65lUrtWiUO+LvTbWmu5dc/RY3Ipjpn5FZqhJtq28pQq4tfHo0vK6LkHGJc Ug2PMUmcup7+YWLspKOimoIiQxE987Hf5HhpqKy3R4lcxqzKNeG0o1ZPxH7nUCHGOE x4W25eRmy6Fi/etq9Xt5GJJbEym3GjnTTcoGR6mo= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 334D6aUa039772 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Apr 2023 08:06:36 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 4 Apr 2023 08:06:36 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 4 Apr 2023 08:06:36 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 334D6ZDR004106; Tue, 4 Apr 2023 08:06:36 -0500 From: Nikhil M Jain To: , , CC: , , , Subject: [PATCH V6 13/13] board: ti: am62x: evm: OSPI support for splash screen Date: Tue, 4 Apr 2023 18:36:10 +0530 Message-ID: <20230404130610.65022-14-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404130610.65022-1-n-jain1@ti.com> References: <20230404130610.65022-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Add ospi boot media support to load splash image from OSPI memory, add offset to read image from ospi and necessary flags defininig type of storage and storage device. Use CONFIG_IS_ENBALED to use the splash locations at SPL and u-boot proper. Signed-off-by: Nikhil M Jain Reviewed-by: Simon Glass Reviewed-by: Devarsh Thakkar --- V6: - No change. V5: - Replace #ifdef with #if. - Add Reviewed-by tag. V4: - Added Reviewed-by tag. V3: - Enable splash location at SPL. V2: - No change. board/ti/am62x/evm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index 584b4ec552..fd58ece29c 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -20,8 +20,14 @@ DECLARE_GLOBAL_DATA_PTR; -#ifdef CONFIG_SPLASH_SCREEN +#if CONFIG_IS_ENABLED(SPLASH_SCREEN) static struct splash_location default_splash_locations[] = { + { + .name = "sf", + .storage = SPLASH_STORAGE_SF, + .flags = SPLASH_STORAGE_RAW, + .offset = 0x700000, + }, { .name = "mmc", .storage = SPLASH_STORAGE_MMC,