Add splash screen support at u-boot SPL
Subsystems (2)
v4 cover Add splash screen support at u-boot SPL
To enable splash screen at SPL stage move video driver and splash screen framework at SPL, which will bring up image on display very quickly and thus have early display support in SPL.
Change in V4
- Add Reviewed-by tag in apprpriate patch
Change in V3
- Add separate video configs for SPL splash screen
- Add rule to compile video driver in drivers/Makefile at SPL
- Add rule to compile splash.c and splash_source.c
- Squash drivers: video: video-uclass: Disable u-boot logo at SPL into
drivers: video: Use CONFIG_IS_ENABLED and CONFIG_VAL
- Split cmd/bmp.c to separate bmp functions and commands.
- Add CONFIG_BMP and CONFIG_SPL_BMP.
- Add rule to compile necessary files required for video driver.
- Add rule to compile common/bmp.c
Change in V2
- Removed artifacts from bad patch apply.
Nikhil M Jain (15):
drivers: video: Kconfig: Add configs for enabling video at SPL
drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL
drivers: Makefile: Add rule to compile video driver
drivers: video: Makefile: Rule to compile necessary video driver
files.
drivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL
common: Makefile: Add rule to compile splash and splash_source at SPL
common: Kconfig: Add BMP configs
cmd: bmp: Split bmp commands and functions
cmd: Makefile: Rule to compile bmp_cmd
common: Makefile: Rule to compile bmp.c
drivers: video: Enable necessary video functions at SPL
common: Enable splash functions at SPL
include: Enable video related global data variable and splash at SPL
common: splash: Replace CONFIG_CMD_BMP
board: ti: am62x: evm: OSPI support for splash screen
board/ti/am62x/evm.c | 8 +-
cmd/Makefile | 3 +-
cmd/bmp_cmd.c | 98 +++++++++++++
common/Kconfig | 12 ++
common/Makefile | 3 +
{cmd => common}/bmp.c | 114 +--------------
common/splash.c | 10 +-
drivers/Makefile | 2 +-
drivers/video/Kconfig | 221 ++++++++++++++++++++++++++++++
drivers/video/Makefile | 10 ++
drivers/video/console_normal.c | 6 +-
drivers/video/tidss/Kconfig | 6 +
drivers/video/tidss/Makefile | 2 +-
drivers/video/vidconsole-uclass.c | 2 +-
drivers/video/video-uclass.c | 14 +-
drivers/video/video_bmp.c | 8 +-
include/asm-generic/global_data.h | 4 +-
include/splash.h | 6 +-
include/video.h | 7 +
19 files changed, 399 insertions(+), 137 deletions(-)
create mode 100644 cmd/bmp_cmd.c
rename {cmd => common}/bmp.c (58%)Signature · 1 line
2.34.1
PATCH v4 1/15 drivers: video: Kconfig: Add configs for enabling video at SPL
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.
---
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 | 221 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+)
drivers/video/Kconfig +221 -0
@@ -900,4 +900,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 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_CMD_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
Signature · 1 line
2.34.1
Re: [PATCH v4 01/15] drivers: video: Kconfig: Add configs for enabling video at SPL
Hi Nikhil,
Thanks for the patch.
Quoted 5 lines · Nikhil M Jain
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 <[email protected]>
Regards
Devarsh
Quoted 244 lines
---
V4:
- No changeV3:
- Add separate SPL video and splash configs
- Reviewed-by tag not added due to additional changes in V3V2:
- No changedrivers/video/Kconfig | 221 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+)drivers/video/Kconfig +221
-0@@ -900,4 +900,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 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_CMD_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
PATCH v4 2/15 drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL
In reply to Nikhil M JainTo enable tidss video driver only at SPL stage, add necessary config, CONFIG_SPL_VIDEO_TIDSS.
---
V4:
- Add Reviewed-By tag
V3:
- No change
V2:
- No change
drivers/video/tidss/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/video/tidss/Kconfig +6 -0
@@ -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 tidssat SPL stage use this config.
Signature · 1 line
2.34.1
PATCH v4 3/15 drivers: Makefile: Add rule to compile video driver
In reply to Nikhil M JainCONFIG_$(SPL_)VIDEO checks for CONFIG_SPL_VIDEO at SPL and CONFIG_VIDEO at u-boot proper and compiles video driver at respective stage.
---
V4:
- No change
V3 (patch introduced):
- Add rule to compile video driver at SPL
drivers/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/Makefile +1 -1
@@ -38,6 +38,7 @@ obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm/ obj-$(CONFIG_XEN) += xen/ obj-$(CONFIG_$(SPL_)FPGA) += fpga/ obj-y += bus/ +obj-$(CONFIG_$(SPL_)VIDEO) += video/ ifndef CONFIG_TPL_BUILD ifndef CONFIG_VPL_BUILD
@@ -96,7 +97,6 @@ obj-y += rtc/ obj-y += scsi/ obj-y += sound/ obj-y += spmi/ -obj-y += video/ obj-y += watchdog/ obj-$(CONFIG_QE) += qe/ obj-$(CONFIG_U_QE) += qe/
Signature · 1 line
2.34.1
Re: [PATCH v4 03/15] drivers: Makefile: Add rule to compile video driver
Hi Nikhil,
Thanks for the patch.
Quoted 26 lines · Nikhil M Jain
CONFIG_$(SPL_)VIDEO checks for
CONFIG_SPL_VIDEOat SPL andCONFIG_VIDEOat u-boot proper and compiles video driver at respective stage.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No changeV3 (patch introduced):
- Add rule to compile video driver at SPLdrivers/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/Makefile +1
-0@@ -38,6 +38,7 @@ obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm/ obj-$(CONFIG_XEN) += xen/ obj-$(CONFIG_$(SPL_)FPGA) += fpga/ obj-y += bus/ +obj-$(CONFIG_$(SPL_)VIDEO) += video/imho it should be obj-y +=video here (see below) ifndef CONFIG_TPL_BUILD ifndef CONFIG_VPL_BUILD
drivers/Makefile obj-y += rtc/ · line 99
Quoted 4 lines
drivers/Makefile +0
-1@@ -96,7 +97,6 @@ obj-y += rtc/ obj-y += scsi/ obj-y += sound/ obj-y += spmi/ -obj-y += video/
Looks to me we are breaking backward compatibility here.
For e.g. I think configs/pinebook_defconfig only enables CONFIG_VIDEO_BRIDGE now it has to enable CONFIG_VIDEO explicitly too ?
Regards
Devarsh
PATCH v4 4/15 drivers: video: Makefile: Rule to compile necessary video driver files.
In reply to Nikhil M JainTo 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 only. To support splash_display at SPL, need to compile video-bmp, add rule to compile at SPL stage only.
---
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 | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/video/Makefile +9 -0
@@ -68,3 +68,12 @@ obj-$(CONFIG_VIDEO_ZYNQMP_DPSUB) += zynqmp_dpsub.o obj-y += bridge/ obj-y += sunxi/ + +ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_SPL_BACKLIGHT) += backlight-uclass.o +obj-$(CONFIG_SPL_PANEL) += panel-uclass.o +obj-$(CONFIG_SPL_SIMPLE_PANEL) += simple_panel.o +obj-$(CONFIG_SPL_CONSOLE_NORMAL) += console_normal.o +obj-$(CONFIG_SPL_VIDEO) += video-uclass.o vidconsole-uclass.o +obj-$(CONFIG_SPL_VIDEO) += video_bmp.o +endif
Signature · 1 line
2.34.1
Re: [PATCH v4 04/15] drivers: video: Makefile: Rule to compile necessary video driver files.
Hi Nikhil,
Quoted 27 lines · Nikhil M Jain
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 only. To support
splash_displayat SPL, need to compile video-bmp, add rule to compile at SPL stage only.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No changeV3:
- Rule to compile backlight, console and panel files
- Not added Reiewed-by tag due to changesV2:
- No changedrivers/video/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/video/Makefile +0
-0@@ -68,3 +68,12 @@ obj-$(CONFIG_VIDEO_ZYNQMP_DPSUB) += zynqmp_dpsub.o
drivers/video/Makefile obj-$(CONFIG_VIDEO_ZYNQMP_DPSUB) += zynqmp_dpsub.o · line 78
Quoted 10 lines
drivers/video/Makefile +8
-0obj-y += bridge/ obj-y += sunxi/ + +ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_SPL_BACKLIGHT) += backlight-uclass.o +obj-$(CONFIG_SPL_PANEL) += panel-uclass.o +obj-$(CONFIG_SPL_SIMPLE_PANEL) += simple_panel.o +obj-$(CONFIG_SPL_CONSOLE_NORMAL) += console_normal.o +obj-$(CONFIG_SPL_VIDEO) += video-uclass.o vidconsole-uclass.o +obj-$(CONFIG_SPL_VIDEO) += video_bmp.o
Can you use
obj-$(CONFIG_$(SPL_TPL_)VIDEO) += video_bmp.o
instead?
If I ever get back to the split config thing we'll need that.
Quoted 4 lines
drivers/video/Makefile +1
-1+endif --2.34.1
Regards,
Simon
Re: [PATCH v4 04/15] drivers: video: Makefile: Rule to compile necessary video driver files.
Hi Simon
Quoted 43 lines · Simon Glass
Hi Nikhil,
Quoted 27 lines · Nikhil M Jain
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 only. To support
splash_displayat SPL, need to compile video-bmp, add rule to compile at SPL stage only.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No changeV3:
- Rule to compile backlight, console and panel files
- Not added Reiewed-by tag due to changesV2:
- No changedrivers/video/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/video/Makefile +0
-0@@ -68,3 +68,12 @@ obj-$(CONFIG_VIDEO_ZYNQMP_DPSUB) += zynqmp_dpsub.odrivers/video/Makefile obj-$(CONFIG_VIDEO_ZYNQMP_DPSUB) += zynqmp_dpsub.o · line 78
Quoted 10 lines
drivers/video/Makefile +8
-0obj-y += bridge/ obj-y += sunxi/ + +ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_SPL_BACKLIGHT) += backlight-uclass.o +obj-$(CONFIG_SPL_PANEL) += panel-uclass.o +obj-$(CONFIG_SPL_SIMPLE_PANEL) += simple_panel.o +obj-$(CONFIG_SPL_CONSOLE_NORMAL) += console_normal.o +obj-$(CONFIG_SPL_VIDEO) += video-uclass.o vidconsole-uclass.o +obj-$(CONFIG_SPL_VIDEO) += video_bmp.oCan you use
Quoted 6 lines
obj-$(CONFIG_$(SPL_TPL_)VIDEO) += video_bmp.o
instead?
If I ever get back to the split config thing we'll need that.
I can use obj-$(CONFIG_$(SPL_TPL_)VIDEO) += video_bmp.o.
Quoted 7 lines
Quoted 4 lines
drivers/video/Makefile +1
-1+endif --2.34.1
Regards,
Simon
Thanks,
Nikhil
PATCH v4 5/15 drivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL
In reply to Nikhil M JainTo enable TIDSS driver only at SPL stage add rule to compile the TIDSS video driver, for SPL stage only if CONFIG_SPL_VIDEO_TIDSS is defined.
CONFIG_$(SPL_)VIDEO_TIDSS will compile tidss_drv, at SPL stage only if CONFIG_SPL_VIDEO_TIDSS is defined and at u-boot proper if CONFIG_VIDEO_TIDSS is defined.
---
V4:
- Added Reviewed-by tag
V3:
- No change
V2:
- No change
drivers/video/Makefile | 1 + drivers/video/tidss/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/video/Makefile +1 -0
@@ -76,4 +76,5 @@ obj-$(CONFIG_SPL_SIMPLE_PANEL) += simple_panel.o obj-$(CONFIG_SPL_CONSOLE_NORMAL) += console_normal.o obj-$(CONFIG_SPL_VIDEO) += video-uclass.o vidconsole-uclass.o obj-$(CONFIG_SPL_VIDEO) += video_bmp.o +obj-$(CONFIG_SPL_VIDEO_TIDSS) += tidss/ endif
drivers/video/tidss/Makefile +1 -1
@@ -9,4 +9,4 @@ # Author: Tomi Valkeinen <[email protected]> -obj-${CONFIG_VIDEO_TIDSS} = tidss_drv.o +obj-${CONFIG_$(SPL_)VIDEO_TIDSS} = tidss_drv.o
Signature · 1 line
2.34.1
PATCH v4 6/15 common: Makefile: Add rule to compile splash and splash_source at SPL
In reply to Nikhil M JainTo 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.
---
V4:
- No change
V3 (patch introduced):
- Rule to compile splash.c and splash_source.c
common/Makefile | 2 ++ 1 file changed, 2 insertions(+)
common/Makefile +2 -0
@@ -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
Signature · 1 line
2.34.1
Re: [PATCH v4 06/15] common: Makefile: Add rule to compile splash and splash_source at SPL
Hi Nikhil,
Thanks for the patch.
Quoted 20 lines · Nikhil M Jain
To enable splash screen and loading bmp from boot media, add rules to compile
splash.candsplash_source.cat SPL stage only whenCONFIG_SPL_SPLASH_SCREENandCONFIG_SPL_SPLASH_SOURCEare defined.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No changeV3 (patch introduced):
- Rule to compilesplash.candsplash_source.ccommon/Makefile | 2 ++ 1 file changed, 2 insertions(+)common/Makefile +0
-0
common/Makefile obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o · line 59
Quoted 4 lines
common/Makefile +1
-0@@ -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
I think above macro is tied to using splashimage env, I think you should use obj-y for this as done in u-boot proper for not to alter the meaning of macro for now.
In case separate Kconfig is needed for splash.o than imho it should be fixed in u-boot proper and parallel Kconfig should be introduced for SPL then.
Regards
Devarsh
PATCH v4 7/15 common: Kconfig: Add BMP config
In reply to Nikhil M JainAdd CONFIG_BMP and CONFIG_SPL_BMP which enable displaying bmp images at u-boot proper and SPL.
---
V4:
- No change
V3 (patch introduced):
- Add CONFIG BMP and SPL_BMP
common/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+)
common/Kconfig +12 -0
@@ -1106,3 +1106,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.
Signature · 1 line
2.34.1
Re: [PATCH v4 07/15] common: Kconfig: Add BMP config
Quoted 9 lines · Nikhil M Jain
Add
CONFIG_BMPandCONFIG_SPL_BMPwhich enable displaying bmp images at u-boot proper and SPL.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No change
Quoted 6 lines
V3 (patch introduced):
- Add CONFIG BMP andSPL_BMPcommon/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+)
PATCH v4 8/15 cmd: bmp: Split bmp commands and functions
In reply to Nikhil M JainTo enable splash screen at spl, need to compile cmd/bmp.c which also includes bmp commands, since SPL can't have commands split bmp.c into common/bmp.c which includes all bmp functions and cmd/bmp_cmd contains bmp commands.
Add delclaration for bmp_info in video.h.
---
V4:
- No change
V3 (patch introduced):
- Split bmp functions and commands
cmd/bmp_cmd.c | 98 +++++++++++++++++++++++++++++++++++++++
{cmd => common}/bmp.c | 104 +-----------------------------------------
include/video.h | 7 +++
3 files changed, 106 insertions(+), 103 deletions(-)
create mode 100644 cmd/bmp_cmd.c
rename {cmd => common}/bmp.c (62%)cmd/bmp_cmd.c new file +98 -0
@@ -0,0 +1,98 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* (C) Copyright 2002 +* Detlev Zundel, DENX Software Engineering, [email protected]. +*/ + +/* +* BMP handling routines +*/ + +#include <common.h> +#include <bmp_layout.h> +#include <command.h> +#include <image.h> +#include <mapmem.h> +#include <splash.h> +#include <video.h> +#include <stdlib.h> + +static int do_bmp_info (struct cmd_tbl *cmdtp,int flag,int argc, +char *const argv[]) +{ +ulong addr; + +switch (argc) { +case 1 :/* use image_load_addr as default address */ + addr = image_load_addr; +break ; +case 2 :/* use argument */ + addr =hextoul (argv[1 ],NULL ); +break ; +default : +return CMD_RET_USAGE ; + } + +return (bmp_info (addr)); +} + +static int do_bmp_display (struct cmd_tbl *cmdtp,int flag,int argc, +char *const argv[]) +{ +ulong addr; +int x =0 , y =0 ; + +splash_get_pos (&x, &y); + +switch (argc) { +case 1 :/* use image_load_addr as default address */ + addr = image_load_addr; +break ; +case 2 :/* use argument */ + addr =hextoul (argv[1 ],NULL ); +break ; +case 4 : + addr =hextoul (argv[1 ],NULL ); +if (!strcmp (argv[2 ],"m" )) + x =BMP_ALIGN_CENTER ; +else + x =dectoul (argv[2 ],NULL ); +if (!strcmp (argv[3 ],"m" )) + y =BMP_ALIGN_CENTER ; +else + y =dectoul (argv[3 ],NULL ); +break ; +default : +return CMD_RET_USAGE ; + } + +return (bmp_display (addr, x, y)); +} + +static struct cmd_tbl cmd_bmp_sub[] = { +U_BOOT_CMD_MKENT (info,3 ,0 , do_bmp_info,"" ,"" ), +U_BOOT_CMD_MKENT (display,5 ,0 , do_bmp_display,"" ,"" ), +}; + +static int do_bmp (struct cmd_tbl *cmdtp,int flag,int argc,char *const argv[]) +{ +struct cmd_tbl *c; + +/* Strip off leading 'bmp' command argument */ + argc--; + argv++; + + c =find_cmd_tbl (argv[0 ], &cmd_bmp_sub[0 ],ARRAY_SIZE (cmd_bmp_sub)); + +if (c) +return c->cmd (cmdtp, flag, argc, argv); +else +return CMD_RET_USAGE ; +} + +U_BOOT_CMD ( + bmp,5 ,1 , do_bmp, +"manipulate BMP image data" , +"info <imageAddr> - display image info\n" +"bmp display <imageAddr> [x y] - display image at x,y" +);
common/bmp.c renamed from cmd/bmp.c +1 -103
128 lines not on this page · raw message
include/video.h +7 -0
@@ -355,4 +355,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
Signature · 1 line
2.34.1
Re: [PATCH v4 08/15] cmd: bmp: Split bmp commands and functions
Hi Nikhil,
Quoted 9 lines · Nikhil M Jain
To enable splash screen at spl, need to compile
cmd/bmp.cwhich also includes bmp commands, since SPL can't have commands splitbmp.cintocommon/bmp.cwhich includes all bmp functions and cmd/bmp_cmd contains bmp commands.Add delclaration for
bmp_infoinvideo.h.Signed-off-by Nikhil M Jain <[email protected]>
Quoted 8 lines
---
V4:
- No changeV3 (patch introduced):
- Split bmp functions and commandscmd/bmp_cmd.c | 98 +++++++++++++++++++++++++++++++++++++++
Please can you keep this as cmd/bmp.c ?
Quoted 6 lines
{cmd => common}/bmp.c | 104 +-----------------------------------------
include/video.h | 7 +++
3 files changed, 106 insertions(+), 103 deletions(-)
create mode 100644 cmd/bmp_cmd.c
rename {cmd => common}/bmp.c (62%)Otherwise looks good
[..]
Regards,
SImon
Re: [PATCH v4 08/15] cmd: bmp: Split bmp commands and functions
Hi Simon,
Quoted 16 lines · Simon Glass
Hi Nikhil,
Quoted 13 lines · Nikhil M Jain
To enable splash screen at spl, need to compile
cmd/bmp.cwhich also includes bmp commands, since SPL can't have commands splitbmp.cintocommon/bmp.cwhich includes all bmp functions and cmd/bmp_cmd contains bmp commands.Add delclaration for
bmp_infoinvideo.h.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No change
Quoted 6 lines
Quoted 4 lines
V3 (patch introduced):
- Split bmp functions and commandscmd/bmp_cmd.c | 98 +++++++++++++++++++++++++++++++++++++++Please can you keep this as
cmd/bmp.c?
I will keep cmd/bmp.c
Quoted 8 lines
Quoted 7 lines
{cmd => common}/bmp.c | 104 +----------------------------------------- include/video.h | 7 +++ 3 files changed, 106 insertions(+), 103 deletions(-)create mode 100644
cmd/bmp_cmd.c
rename {cmd =>common}/bmp.c(62%)
Quoted 6 lines
Otherwise looks good
[..]
Regards,
SImon
Thanks,
Nikhil
PATCH v4 9/15 cmd: Makefile: Rule to compile bmp_cmd
In reply to Nikhil M JainChange rule to compile bmp_cmd when CONFIG_CMD_BMP is defined, in place of bmp.c.
---
V4:
- No change
V3 (patch introduced):
- Rule to compile bmp_cmd.c
cmd/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
cmd/Makefile +2 -1
@@ -29,7 +29,7 @@ obj-$(CONFIG_CMD_BIND) += bind.o obj-$(CONFIG_CMD_BINOP) += binop.o obj-$(CONFIG_CMD_BLOBLIST) += bloblist.o obj-$(CONFIG_CMD_BLOCK_CACHE) += blkcache.o -obj-$(CONFIG_CMD_BMP) += bmp.o +obj-$(CONFIG_CMD_BMP) += bmp_cmd.o obj-$(CONFIG_CMD_BOOTCOUNT) += bootcount.o obj-$(CONFIG_CMD_BOOTEFI) += bootefi.o obj-$(CONFIG_CMD_BOOTMENU) += bootmenu.o
@@ -235,6 +235,7 @@ obj-$(CONFIG_$(SPL_)CMD_TLV_EEPROM) += tlv_eeprom.o # core command obj-y += nvedit.o +obj-y += read.o obj-$(CONFIG_CMD_BCM_EXT_UTILS) += broadcom/
Signature · 1 line
2.34.1
Re: [PATCH v4 09/15] cmd: Makefile: Rule to compile bmp_cmd
Hi Nikhil,
Thanks for the patch.
Quoted 19 lines · Nikhil M Jain
Change rule to compile
bmp_cmdwhenCONFIG_CMD_BMPis defined, in place ofbmp.c.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No changeV3 (patch introduced):
- Rule to compilebmp_cmd.ccmd/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)cmd/Makefile +0
-0
cmd/Makefile obj-$(CONFIG_CMD_BIND) += bind.o · line 32
Quoted 4 lines
cmd/Makefile +0
-1@@ -29,7 +29,7 @@ obj-$(CONFIG_CMD_BIND) += bind.o obj-$(CONFIG_CMD_BINOP) += binop.o obj-$(CONFIG_CMD_BLOBLIST) += bloblist.o obj-$(CONFIG_CMD_BLOCK_CACHE) += blkcache.o -obj-$(CONFIG_CMD_BMP) += bmp.o
I think we are breaking backward compatibility here, the platforms only enabled CONFIG_CMD_BMP in defconfig.
cmd/Makefile obj-$(CONFIG_CMD_BIND) += bind.o · line 32
Quoted 1 line
cmd/Makefile +1
-0+obj-$(CONFIG_CMD_BMP) += bmp_cmd.o
I think you should add bmp.o too in above to preserve backward compatibility.
Regards
Devarsh
Re: [PATCH v4 09/15] cmd: Makefile: Rule to compile bmp_cmd
In reply to Nikhil M JainHi Nikhil,
One more comment on this patch.
Quoted 28 lines · Nikhil M Jain
Change rule to compile
bmp_cmdwhenCONFIG_CMD_BMPis defined, in place ofbmp.c.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No changeV3 (patch introduced):
- Rule to compilebmp_cmd.ccmd/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)cmd/Makefile +1
-1@@ -29,7 +29,7 @@ obj-$(CONFIG_CMD_BIND) += bind.o obj-$(CONFIG_CMD_BINOP) += binop.o obj-$(CONFIG_CMD_BLOBLIST) += bloblist.o obj-$(CONFIG_CMD_BLOCK_CACHE) += blkcache.o -obj-$(CONFIG_CMD_BMP) += bmp.o +obj-$(CONFIG_CMD_BMP) += bmp_cmd.o obj-$(CONFIG_CMD_BOOTCOUNT) += bootcount.o obj-$(CONFIG_CMD_BOOTEFI) += bootefi.o obj-$(CONFIG_CMD_BOOTMENU) += bootmenu.o
cmd/Makefile obj-$(CONFIG_$(SPL_)CMD_TLV_EEPROM) += tlv_eeprom.o · line 238
Quoted 4 lines
cmd/Makefile +1
-0@@ -235,6 +235,7 @@ obj-$(CONFIG_$(SPL_)CMD_TLV_EEPROM) += tlv_eeprom.o # core command obj-y += nvedit.o +obj-y += read.o
commit message doesnt describe above change, is it really required ?
Regards
Devarsh
Quoted 3 lines
cmd/Makefile +0
-0obj-$(CONFIG_CMD_BCM_EXT_UTILS) += broadcom/
PATCH v4 10/15 common: Makefile: Rule to compile bmp.c
In reply to Nikhil M JainAdd rule to compile bmp.c at SPL and u-boot proper when CONFIG_SPL_BMP and CONFIG_BMP are defined.
---
V4:
- No change
V3 (patch introduced):
- Rule to compile common/bmp.c
common/Makefile | 1 + 1 file changed, 1 insertion(+)
common/Makefile +1 -0
@@ -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
Signature · 1 line
2.34.1
Re: [PATCH v4 10/15] common: Makefile: Rule to compile bmp.c
Hi Nikhil
Thanks for the patch.
Quoted 19 lines · Nikhil M Jain
Add rule to compile
bmp.cat SPL and u-boot proper whenCONFIG_SPL_BMPandCONFIG_BMPare defined.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No changeV3 (patch introduced):
- Rule to compilecommon/bmp.ccommon/Makefile | 1 + 1 file changed, 1 insertion(+)common/Makefile +0
-0
common/Makefile endif # !CONFIG_SPL_BUILD · line 48
Quoted 4 lines
common/Makefile +1
-0@@ -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
If going with suggestion in previous patch to preserve backward compatiblity with u-boot proper you should go withCONFIG_SPL_BMP to make it specific to SPL.
Regards
Devarsh
PATCH v4 11/15 drivers: video: Enable necessary video functions at SPL
In reply to Nikhil M JainTo 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.
---
V4:
- No change
V3 (patch introduced):
- Enable necessary video functions at SPL
drivers/video/console_normal.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(-)
drivers/video/console_normal.c +3 -3
@@ -24,7 +24,7 @@ static int console_normal_set_row(struct udevice *dev, uint row, int clr) line = vid_priv->fb + row *VIDEO_FONT_HEIGHT * vid_priv->line_length;switch (vid_priv->bpix) {case VIDEO_BPP8 : -if (IS_ENABLED (CONFIG_VIDEO_BPP8 )) { +if (CONFIG_IS_ENABLED (VIDEO_BPP8 )) {uint8_t *dst = line;for (i =0 ; i < pixels; i++)
@@ -33,7 +33,7 @@ static int console_normal_set_row(struct udevice *dev, uint row, int clr)break ; }case VIDEO_BPP16 : -if (IS_ENABLED (CONFIG_VIDEO_BPP16 )) { +if (CONFIG_IS_ENABLED (VIDEO_BPP16 )) {uint16_t *dst = line;for (i =0 ; i < pixels; i++)
@@ -42,7 +42,7 @@ static int console_normal_set_row(struct udevice *dev, uint row, int clr)break ; }case VIDEO_BPP32 : -if (IS_ENABLED (CONFIG_VIDEO_BPP32 )) { +if (CONFIG_IS_ENABLED (VIDEO_BPP32 )) {uint32_t *dst = line;for (i =0 ; i < pixels; i++)
drivers/video/vidconsole-uclass.c +1 -1
@@ -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;
drivers/video/video-uclass.c +7 -7
@@ -116,7 +116,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;
@@ -133,7 +133,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;
@@ -142,7 +142,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;
@@ -196,14 +196,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) |
@@ -497,8 +497,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" );
drivers/video/video_bmp.c +4 -4
@@ -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 ) {
Signature · 1 line
2.34.1
Re: [PATCH v4 11/15] drivers: video: Enable necessary video functions at SPL
Hi Nikhil,
Thanks for the patch.
Quoted 5 lines · Nikhil M Jain
To support video driver at SPL use
CONFIG_IS_ENABLEDandCONFIG_VAL, which checks for stage specific configs and thus enables video support at respective stage.Signed-off-by Nikhil M Jain <[email protected]>
Regards
Devarsh
Quoted 156 lines
---
V4:
- No changeV3 (patch introduced):
- Enable necessary video functions at SPLdrivers/video/console_normal.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(-)drivers/video/console_normal.c +3
-3@@ -24,7 +24,7 @@ static int console_normal_set_row(struct udevice *dev, uint row, int clr) line = vid_priv->fb + row *VIDEO_FONT_HEIGHT * vid_priv->line_length;switch (vid_priv->bpix) {case VIDEO_BPP8 : -if (IS_ENABLED (CONFIG_VIDEO_BPP8 )) { +if (CONFIG_IS_ENABLED (VIDEO_BPP8 )) {uint8_t *dst = line;for (i =0 ; i < pixels; i++)@@ -33,7 +33,7 @@ static int console_normal_set_row(struct udevice *dev, uint row, int clr)break ; }case VIDEO_BPP16 : -if (IS_ENABLED (CONFIG_VIDEO_BPP16 )) { +if (CONFIG_IS_ENABLED (VIDEO_BPP16 )) {uint16_t *dst = line;for (i =0 ; i < pixels; i++)@@ -42,7 +42,7 @@ static int console_normal_set_row(struct udevice *dev, uint row, int clr)break ; }case VIDEO_BPP32 : -if (IS_ENABLED (CONFIG_VIDEO_BPP32 )) { +if (CONFIG_IS_ENABLED (VIDEO_BPP32 )) {uint32_t *dst = line;for (i =0 ; i < pixels; i++)drivers/video/vidconsole-uclass.c +1
-1@@ -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;drivers/video/video-uclass.c +7
-7@@ -116,7 +116,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;@@ -133,7 +133,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;@@ -142,7 +142,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;@@ -196,14 +196,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) |@@ -497,8 +497,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" );drivers/video/video_bmp.c +4
-4@@ -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 ) {
PATCH v4 12/15 common: Enable splash functions at SPL
In reply to Nikhil M JainTo support splash screen at SPL use CONFIG_IS_ENABLED and CONFIG_VAL. To check for stage specific configs at u-boot proper and SPL.
---
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(-)
common/bmp.c +5 -5
@@ -33,7 +33,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) {
@@ -44,9 +44,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 ;
@@ -55,12 +55,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" );/*
common/splash.c +5 -5
@@ -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 <bmp_logo.h>
@@ -157,7 +157,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 ) && defined(CONFIG_CMD_BMP )int splash_display (void ) {ulong addr;
@@ -181,7 +181,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:
Signature · 1 line
2.34.1
Re: [PATCH v4 12/15] common: Enable splash functions at SPL
Hi Nikhil
Thanks for the patch,
Quoted 86 lines · Nikhil M Jain
To support splash screen at SPL use
CONFIG_IS_ENABLEDandCONFIG_VAL. To check for stage specific configs at u-boot proper and SPL.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No changeV3 (patch introduced):
- Enable splash functions at SPLcommon/bmp.c | 10 +++++----- common/splash.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-)common/bmp.c +5
-5@@ -33,7 +33,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) {@@ -44,9 +44,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 ;@@ -55,12 +55,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" );/* common/splash.c +3
-3@@ -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 <bmp_logo.h>
common/splash.c void splash_display_banner(void) · line 160
Quoted 5 lines
common/splash.c +1
-1@@ -157,7 +157,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 ) && defined(CONFIG_CMD_BMP )
I thought you don't set CONFIG_CMD_BMP for SPL ? If so you should add an or for CONFIG_SPL_BMP ?
I am not sure how it works today then without this change.
Regards
Devarsh
Quoted 12 lines
common/splash.c +1
-1int splash_display (void ) {ulong addr;@@ -181,7 +181,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:
Re: [PATCH v4 12/15] common: Enable splash functions at SPL
Hi Devarsh
Quoted 88 lines · Devarsh Thakkar
Hi Nikhil
Thanks for the patch,
Quoted 83 lines · Nikhil M Jain
To support splash screen at SPL use
CONFIG_IS_ENABLEDandCONFIG_VAL. To check for stage specific configs at u-boot proper and SPL.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No changeV3 (patch introduced):
- Enable splash functions at SPLcommon/bmp.c | 10 +++++----- common/splash.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-)common/bmp.c +5
-5@@ -33,7 +33,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) {@@ -44,9 +44,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 ;@@ -55,12 +55,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" );/* common/splash.c +3
-3@@ -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 )
Quoted 12 lines
common/splash.c void splash_display_banner(void) · line 160
Quoted 8 lines
common/splash.c +1
-1#ifdef CONFIG_VIDEO_LOGO #include <bmp_logo.h> @@ -157,7 +157,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 ) && defined(CONFIG_CMD_BMP )I thought you don't set
CONFIG_CMD_BMPfor SPL ? If so you should add an or forCONFIG_SPL_BMP?
I am not sure how it works today then without this change.
I have done the change in
patch 14 common: splash: Replace CONFIG_CMD_BMP
Quoted 10 lines
Regards
DevarshQuoted 7 lines
common/splash.c +0
-0int splash_display (void ) {ulong addr;@@ -181,7 +181,7 @@ int splash_display(void)if (x || y) goto end;
Quoted 5 lines
common/splash.c int splash_display(void) · line 187
Quoted 5 lines
common/splash.c +1
-1-#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:
Thanks,
Nikhil
PATCH v4 13/15 include: Enable video related global data variable and splash at SPL
In reply to Nikhil M JainTo include video related global data variables and splash functions at SPL, use CONFIG_IS_ENABLED.
---
V4:
- No change
V3 (patch introduced):
- Include video related global data variables
- Include splash display functions
include/asm-generic/global_data.h | 4 ++-- include/splash.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
include/asm-generic/global_data.h +2 -2
@@ -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 */
include/splash.h +3 -3
@@ -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 ) && defined(CONFIG_CMD_BMP )int splash_display (void );#else static inline int splash_display (void )
Signature · 1 line
2.34.1
Re: [PATCH v4 13/15] include: Enable video related global data variable and splash at SPL
Hi Nikhil
Thanks for the patch,
Quoted 54 lines · Nikhil M Jain
To include video related global data variables and splash functions at SPL, use
CONFIG_IS_ENABLED.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No changeV3 (patch introduced):
- Include video related global data variables
- Include splash display functionsinclude/asm-generic/global_data.h | 4 ++-- include/splash.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)include/asm-generic/global_data.h +2
-2@@ -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 */ include/splash.h +1
-1@@ -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 );
include/splash.h static inline int splash_source_load(struct splash_location *locations, · line 70
Quoted 10 lines
include/splash.h +2
-2-#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 ) && defined(CONFIG_CMD_BMP )
Same comment as previous patch, don't you need CONFIG_SPL_BMP ?
Quoted 3 lines
include/splash.h +0
-0int splash_display (void );#else static inline int splash_display (void )
PATCH v4 14/15 common: splash: Replace CONFIG_CMD_BMP
In reply to Nikhil M JainReplace CONFIG_CMD_BMP with CONFIG_BMP to enable splash_display function at u-boot proper and SPL.
---
V4:
- No change
V3 (patch introduced):
- Replace CONFIG_CMD_BMP with CONFIG_BMP
common/splash.c | 2 +- include/splash.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
common/splash.c +1 -1
@@ -157,7 +157,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 CONFIG_IS_ENABLED (SPLASH_SCREEN ) && defined(CONFIG_CMD_BMP ) +#if CONFIG_IS_ENABLED (SPLASH_SCREEN ) &&CONFIG_IS_ENABLED (BMP )int splash_display (void ) {ulong addr;
include/splash.h +1 -1
@@ -67,7 +67,7 @@ void splash_get_pos(int *x, int *y);static inline void splash_get_pos (int *x,int *y) { }#endif -#if CONFIG_IS_ENABLED (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 )
Signature · 1 line
2.34.1
Re: [PATCH v4 14/15] common: splash: Replace CONFIG_CMD_BMP
Hi Nikhil,
Thanks for the patch.
I think good to squash similar patches to CONFIG_BMP together.
Quoted 20 lines · Nikhil M Jain
Replace
CONFIG_CMD_BMPwithCONFIG_BMPto enablesplash_displayfunction at u-boot proper and SPL.Signed-off-by Nikhil M Jain <[email protected]>---
V4:
- No changeV3 (patch introduced):
- ReplaceCONFIG_CMD_BMPwithCONFIG_BMPcommon/splash.c | 2 +- include/splash.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)common/splash.c +0
-0
common/splash.c void splash_display_banner(void) · line 160
Quoted 5 lines
common/splash.c +1
-1@@ -157,7 +157,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 CONFIG_IS_ENABLED (SPLASH_SCREEN ) && defined(CONFIG_CMD_BMP ) +#if CONFIG_IS_ENABLED (SPLASH_SCREEN ) &&CONFIG_IS_ENABLED (BMP )
This seems to break backward compatibility for platforms who only use CONFIG_CMD_BMP.
I think you can use CONFIG_CMD_BMP orred with CONFIG_SPL_BMP
Regards
Devarsh
Quoted 16 lines
common/splash.c +0
-0int splash_display (void ) {ulong addr;include/splash.h +1
-1@@ -67,7 +67,7 @@ void splash_get_pos(int *x, int *y);static inline void splash_get_pos (int *x,int *y) { }#endif -#if CONFIG_IS_ENABLED (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 )
PATCH v4 15/15 board: ti: am62x: evm: OSPI support for splash screen
In reply to Nikhil M JainAdd 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.
---
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(-)
board/ti/am62x/evm.c +7 -1
@@ -20,8 +20,14 @@DECLARE_GLOBAL_DATA_PTR ; -#ifdef CONFIG_SPLASH_SCREEN +#ifdef 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,
Signature · 1 line
2.34.1
Re: [PATCH v4 15/15] board: ti: am62x: evm: OSPI support for splash screen
Hi Nikhil
Thanks for the patch.
Quoted 9 lines · Nikhil M Jain
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_ENBALEDto use the splash locations at SPL and u-boot proper.Signed-off-by Nikhil M Jain <[email protected]>Reviewed-by Simon Glass <[email protected]>
Regards
Devarsh
Quoted 33 lines
---
V4:
- Added Reviewed-by tagV3:
- Enable splash location at SPLV2:
- no changeboard/ti/am62x/evm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)board/ti/am62x/evm.c +7
-1@@ -20,8 +20,14 @@DECLARE_GLOBAL_DATA_PTR ; -#ifdef CONFIG_SPLASH_SCREEN +#ifdef 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,
Hi Nikhil,
Quoted 63 lines · Nikhil M Jain
To enable splash screen at SPL stage move video driver and splash screen framework at SPL, which will bring up image on display very quickly and thus have early display support in SPL.
Change in V4
- Add Reviewed-by tag in apprpriate patchChange in V3
- Add separate video configs for SPL splash screen
- Add rule to compile video driver indrivers/Makefileat SPL
- Add rule to compilesplash.candsplash_source.c
- Squash drivers: video: video-uclass: Disable u-boot logo at SPL into
drivers: video: UseCONFIG_IS_ENABLEDandCONFIG_VAL
- Splitcmd/bmp.cto separate bmp functions and commands.
- AddCONFIG_BMPandCONFIG_SPL_BMP.
- Add rule to compile necessary files required for video driver.
- Add rule to compilecommon/bmp.cChange in V2
- Removed artifacts from bad patch apply.Nikhil M Jain (15):
drivers: video:Kconfig: Add configs for enabling video at SPL
drivers: video: tidss:Kconfig: Configs to enable TIDSS at SPL
drivers:Makefile: Add rule to compile video driver
drivers: video:Makefile: Rule to compile necessary video driver
files.
drivers: video: tidss:Makefile: Add condition to compile TIDSS at SPL
common:Makefile: Add rule to compile splash andsplash_sourceat SPL
common:Kconfig: Add BMP configs
cmd: bmp: Split bmp commands and functions
cmd:Makefile: Rule to compilebmp_cmd
common:Makefile: Rule to compilebmp.c
drivers: video: Enable necessary video functions at SPL
common: Enable splash functions at SPL
include: Enable video related global data variable and splash at SPL
common: splash: ReplaceCONFIG_CMD_BMP
board: ti: am62x: evm: OSPI support for splash screenboard/ti/am62x/evm.c | 8 +- cmd/Makefile | 3 +- cmd/bmp_cmd.c | 98 +++++++++++++ common/Kconfig | 12 ++ common/Makefile | 3 + {cmd => common}/bmp.c | 114 +-------------- common/splash.c | 10 +- drivers/Makefile | 2 +- drivers/video/Kconfig | 221 ++++++++++++++++++++++++++++++ drivers/video/Makefile | 10 ++ drivers/video/console_normal.c | 6 +- drivers/video/tidss/Kconfig | 6 + drivers/video/tidss/Makefile | 2 +- drivers/video/vidconsole-uclass.c | 2 +- drivers/video/video-uclass.c | 14 +- drivers/video/video_bmp.c | 8 +- include/asm-generic/global_data.h | 4 +- include/splash.h | 6 +- include/video.h | 7 + 19 files changed, 399 insertions(+), 137 deletions(-) create mode 100644 cmd/bmp_cmd.c rename {cmd => common}/bmp.c (58%)
Quoted 3 lines
--
2.34.1
I wasn't able to apply this to -next due to conflicts. Could you please check that?
Regards,
Simon
Hi Simon
Quoted 66 lines · Simon Glass
Hi Nikhil,
Quoted 63 lines · Nikhil M Jain
To enable splash screen at SPL stage move video driver and splash screen framework at SPL, which will bring up image on display very quickly and thus have early display support in SPL.
Change in V4
- Add Reviewed-by tag in apprpriate patchChange in V3
- Add separate video configs for SPL splash screen
- Add rule to compile video driver indrivers/Makefileat SPL
- Add rule to compilesplash.candsplash_source.c
- Squash drivers: video: video-uclass: Disable u-boot logo at SPL into
drivers: video: UseCONFIG_IS_ENABLEDandCONFIG_VAL
- Splitcmd/bmp.cto separate bmp functions and commands.
- AddCONFIG_BMPandCONFIG_SPL_BMP.
- Add rule to compile necessary files required for video driver.
- Add rule to compilecommon/bmp.cChange in V2
- Removed artifacts from bad patch apply.Nikhil M Jain (15):
drivers: video:Kconfig: Add configs for enabling video at SPL
drivers: video: tidss:Kconfig: Configs to enable TIDSS at SPL
drivers:Makefile: Add rule to compile video driver
drivers: video:Makefile: Rule to compile necessary video driver
files.
drivers: video: tidss:Makefile: Add condition to compile TIDSS at SPL
common:Makefile: Add rule to compile splash andsplash_sourceat SPL
common:Kconfig: Add BMP configs
cmd: bmp: Split bmp commands and functions
cmd:Makefile: Rule to compilebmp_cmd
common:Makefile: Rule to compilebmp.c
drivers: video: Enable necessary video functions at SPL
common: Enable splash functions at SPL
include: Enable video related global data variable and splash at SPL
common: splash: ReplaceCONFIG_CMD_BMP
board: ti: am62x: evm: OSPI support for splash screenboard/ti/am62x/evm.c | 8 +- cmd/Makefile | 3 +- cmd/bmp_cmd.c | 98 +++++++++++++ common/Kconfig | 12 ++ common/Makefile | 3 + {cmd => common}/bmp.c | 114 +-------------- common/splash.c | 10 +- drivers/Makefile | 2 +- drivers/video/Kconfig | 221 ++++++++++++++++++++++++++++++ drivers/video/Makefile | 10 ++ drivers/video/console_normal.c | 6 +- drivers/video/tidss/Kconfig | 6 + drivers/video/tidss/Makefile | 2 +- drivers/video/vidconsole-uclass.c | 2 +- drivers/video/video-uclass.c | 14 +- drivers/video/video_bmp.c | 8 +- include/asm-generic/global_data.h | 4 +- include/splash.h | 6 +- include/video.h | 7 + 19 files changed, 399 insertions(+), 137 deletions(-)create mode 100644
cmd/bmp_cmd.c
rename {cmd =>common}/bmp.c(58%)
Quoted 7 lines
Quoted 3 lines
--
2.34.1I wasn't able to apply this to -next due to conflicts. Could you please check that?
I will check and fix the issue.
Quoted 2 lines
Regards,
Simon
Thanks,
Nikhil