Refactor tidss_drv and enable early splash on AM625
v3 cover Refactor tidss_drv and enable early splash on AM625
- Refactor tidss_drv
- Add am62x_a53_splashscreen.config to enable splashscreen at u-boot SPL
---
Note:
- As OLDI specific changes are in progress to be synced to upstream DT, use this[1] branch to enable SD-MMC splash on AM62X. Upstream DT changes can be found here[2][3].
- Use TI logo file(ti_logo_414x97_32bpp.bmp.gz) from this link[4].
[1]: https://github.com/swamiljain/u-boot/tree/v3_splash_final
[2]: https://lore.kernel.org/all/[email protected]/
[3]: https://lore.kernel.org/all/[email protected]/
[4]: https://github.com/swamiljain/ti-splash-logo/blob/main/ti_logo_414x97_32bpp.bmp.gz
---
Changelog v2->v3:
- Add splashscreen.config fragment to enable splashscreen
- Align OLDI mode detection logic with kernel side upstreamed OLDI series[1]
- Address styling issue mentioned by Devarsh
- Pick up R-by tag for PATCH 1/2
Link to v2:
https://lore.kernel.org/all/[email protected]/
Changelog v1->v2
- Iterate through all available OLDIs
- Move dss_oldi_tx_power from tidss_drv.c to tidss_oldi.c
- Rename tidss_attach_active_panel to a more generic name
- To handle all active hw video ports, add an array for active hw vps
- Iterate through all active hw vps to enable respective clks
Link to v1: https://lore.kernel.org/u-boot/[email protected]/
---
Devarsh Thakkar (1):
configs: am62x_evm_a53_defconfig: Enable A53 splashscreen at u-boot
SPL
Swamil Jain (1):
drivers: video: tidss: Refactor tidss_drv
configs/am62x_a53_splashscreen.config | 16 ++ configs/am62x_evm_a53_defconfig | 4 +- drivers/video/tidss/Makefile | 2 +- drivers/video/tidss/tidss_drv.c | 235 +++++++++++------ drivers/video/tidss/tidss_drv.h | 40 ++- drivers/video/tidss/tidss_oldi.c | 364 ++++++++++++++++++++++++++ drivers/video/tidss/tidss_oldi.h | 72 +++++ drivers/video/tidss/tidss_regs.h | 21 -- 8 files changed, 631 insertions(+), 123 deletions(-) create mode 100644 configs/am62x_a53_splashscreen.config create mode 100644 drivers/video/tidss/tidss_oldi.c create mode 100644 drivers/video/tidss/tidss_oldi.h
PATCH RESEND v3 1/2 drivers: video: tidss: Refactor tidss_drv
- Refactor tidss_drv to improve modularity, enabling support for more display interfaces beyond OLDI in the future
- Add detection and initialization of active OLDI panels using the DT
- Port tidss_oldi.c from the upstream Linux kernel oldi series[0] and derive several APIs from it to determine the dual link pixel order
- Add tidss_oldi_init() and helper routines to handle OLDI-specific setup and move related helper routines to tidss_oldi.c
[0]: https://lore.kernel.org/all/[email protected]/
--- drivers/video/tidss/Makefile | 2 +- drivers/video/tidss/tidss_drv.c | 235 +++++++++++++------- drivers/video/tidss/tidss_drv.h | 40 ++-- drivers/video/tidss/tidss_oldi.c | 364 +++++++++++++++++++++++++++++++ drivers/video/tidss/tidss_oldi.h | 72 ++++++ drivers/video/tidss/tidss_regs.h | 21 -- 6 files changed, 612 insertions(+), 122 deletions(-) create mode 100644 drivers/video/tidss/tidss_oldi.c create mode 100644 drivers/video/tidss/tidss_oldi.h
drivers/video/tidss/Makefile +1 -1
@@ -9,4 +9,4 @@ # Author: Tomi Valkeinen <[email protected]> -obj-${CONFIG_$(PHASE_)VIDEO_TIDSS} = tidss_drv.o +obj-${CONFIG_$(PHASE_)VIDEO_TIDSS} = tidss_drv.o tidss_oldi.o
drivers/video/tidss/tidss_drv.c +156 -79
321 lines not on this page · raw message
drivers/video/tidss/tidss_drv.h +19 -21
@@ -13,9 +13,12 @@#define __TIDSS_DRV_H__#include <media_bus_format.h> +#include <syscon.h> +#include <regmap.h> #define TIDSS_MAX_PORTS 4#define TIDSS_MAX_PLANES 4 +#define TIDSS_MAX_OLDI_TXES 2enum dss_vp_bus_type {DSS_VP_DPI ,/* DPI output */
@@ -24,13 +27,17 @@ enum dss_vp_bus_type { DSS_VP_MAX_BUS_TYPE, }; -enum dss_oldi_modes { -OLDI_MODE_OFF ,/* OLDI turned off / tied off in IP. */ -OLDI_SINGLE_LINK_SINGLE_MODE ,/* Single Output over OLDI 0. */ -OLDI_SINGLE_LINK_DUPLICATE_MODE ,/* Duplicate Output over OLDI 0 and 1. */ -OLDI_DUAL_LINK ,/* Combined Output over OLDI 0 and 1. */ +enum tidss_oldi_link_type { +OLDI_MODE_UNSUPPORTED , +OLDI_MODE_SINGLE_LINK , +OLDI_MODE_CLONE_SINGLE_LINK , +OLDI_MODE_SECONDARY_CLONE_SINGLE_LINK , +OLDI_MODE_DUAL_LINK , +OLDI_MODE_SECONDARY_DUAL_LINK , }; +enum oldi_mode_reg_val {SPWG_18 =0 ,JEIDA_24 =1 ,SPWG_24 =2 }; +struct dss_features_scaling {u32 in_width_max_5tap_rgb;u32 in_width_max_3tap_rgb;
@@ -96,25 +103,11 @@ struct dss_features {u32 vid_order[TIDSS_MAX_PLANES ]; }; -enum dss_oldi_mode_reg_val {SPWG_18 =0 ,JEIDA_24 =1 ,SPWG_24 =2 }; -struct dss_bus_format {u32 bus_fmt;u32 data_width;bool is_oldi_fmt; -enum dss_oldi_mode_reg_val oldi_mode_reg_val; -}; - -static struct dss_bus_format dss_bus_formats[] = { - {MEDIA_BUS_FMT_RGB444_1X12 ,12 , false,0 }, - {MEDIA_BUS_FMT_RGB565_1X16 ,16 , false,0 }, - {MEDIA_BUS_FMT_RGB666_1X18 ,18 , false,0 }, - {MEDIA_BUS_FMT_RGB888_1X24 ,24 , false,0 }, - {MEDIA_BUS_FMT_RGB101010_1X30 ,30 , false,0 }, - {MEDIA_BUS_FMT_RGB121212_1X36 ,36 , false,0 }, - {MEDIA_BUS_FMT_RGB666_1X7X3_SPWG ,18 , true,SPWG_18 }, - {MEDIA_BUS_FMT_RGB888_1X7X4_SPWG ,24 , true,SPWG_24 }, - {MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA ,24 , true,JEIDA_24 }, +enum oldi_mode_reg_val oldi_mode_reg_val; };struct tidss_drv_priv {
@@ -128,10 +121,15 @@ struct tidss_drv_priv {const struct dss_features *feat;struct clk fclk;struct dss_vp_data vp_data[TIDSS_MAX_PORTS ]; -enum dss_oldi_modes oldi_mode; +enum tidss_oldi_link_type oldi_mode;struct dss_bus_format *bus_format;u32 pixel_format;u32 memory_bandwidth_limit; +unsigned int num_oldis; +struct tidss_oldi *oldis[TIDSS_MAX_OLDI_TXES ]; +u8 active_hw_vps[TIDSS_MAX_PORTS ]; + u8 active_pipelines; }; +struct tidss_oldi ;#endif
drivers/video/tidss/tidss_oldi.c new file +364 -0
364 lines not on this page · raw message
drivers/video/tidss/tidss_oldi.h new file +72 -0
72 lines not on this page · raw message
drivers/video/tidss/tidss_regs.h +0 -21
@@ -231,27 +231,6 @@ enum dss_common_regs {#define DSS_VP_DSS_DMA_THREADSIZE 0x170/* J721E */ #define DSS_VP_DSS_DMA_THREADSIZE_STATUS 0x174/* J721E */ -/* -* OLDI IO_CTRL register offsets. On AM654 the registers are found -* from CTRL_MMR0, there the syscon regmap should map 0x14 bytes from -* CTRLMMR0P1_OLDI_DAT0_IO_CTRL to CTRLMMR0P1_OLDI_CLK_IO_CTRL -* register range. -*/ -#define OLDI_DAT0_IO_CTRL 0x00 -#define OLDI_DAT1_IO_CTRL 0x04 -#define OLDI_DAT2_IO_CTRL 0x08 -#define OLDI_DAT3_IO_CTRL 0x0C -#define OLDI_CLK_IO_CTRL 0x10 - -/* Only for AM625 OLDI TX */ -#define OLDI_PD_CTRL 0x100 -#define OLDI_LB_CTRL 0x104 - -#define OLDI_BANDGAP_PWR BIT(8) -#define OLDI_PWRDN_TX BIT(8) -#define OLDI0_PWRDN_TX BIT(0) -#define OLDI1_PWRDN_TX BIT(1) -/* Supported plane formats */ #define DSS_FORMAT_ARGB4444 0x0#define DSS_FORMAT_ABGR4444 0x1
Re: [RESEND PATCH v3 1/2] drivers: video: tidss: Refactor tidss_drv
Quoted 12 lines · Swamil Jain
- Refactor
tidss_drvto improve modularity, enabling support for more display interfaces beyond OLDI in the future
- Add detection and initialization of active OLDI panels using the DT
- Porttidss_oldi.cfrom the upstream Linux kernel oldi series[0] and derive several APIs from it to determine the dual link pixel order
- Addtidss_oldi_init()and helper routines to handle OLDI-specific setup and move related helper routines totidss_oldi.c[0]: https://lore.kernel.org/all/[email protected]/
Reviewed-by Devarsh Thakkar <[email protected]>Signed-off-by Swamil Jain <[email protected]>
Quoted 10 lines
--- drivers/video/tidss/Makefile | 2 +- drivers/video/tidss/tidss_drv.c | 235 +++++++++++++------- drivers/video/tidss/tidss_drv.h | 40 ++-- drivers/video/tidss/tidss_oldi.c | 364 +++++++++++++++++++++++++++++++ drivers/video/tidss/tidss_oldi.h | 72 ++++++ drivers/video/tidss/tidss_regs.h | 21 -- 6 files changed, 612 insertions(+), 122 deletions(-) create mode 100644 drivers/video/tidss/tidss_oldi.c create mode 100644 drivers/video/tidss/tidss_oldi.h
You didn't include my feedback about making sure this either builds on sandbox or updates the Kconfig to have appropriate dependencies. I checked the build failure more, and we fail to build this on sandbox (and so allyesconfig) because <asm/utils.h> doesn't exist on sandbox, but also isn't needed here. It really is only needed in two files because it only defines what should be generic math header functions. So, here's my request. In a follow up patch, please do either of:
- Remove <asm/utils.h> from everything that doesn't call log_2_n_round_{up,down}.
- Remove arch/arm/include/asm/utils.h and replace the calls of log_2_n_round_(up,down} with what must be the common linux kernel equivalent that's been added in the last 15 years.
Thanks.
Signature · 1 line
Tom
Re: [RESEND PATCH v3 1/2] drivers: video: tidss: Refactor tidss_drv
Hi Tom,
Quoted 25 lines · Tom Rini
Quoted 20 lines · Swamil Jain
- Refactor
tidss_drvto improve modularity, enabling support for more display interfaces beyond OLDI in the future
- Add detection and initialization of active OLDI panels using the DT
- Porttidss_oldi.cfrom the upstream Linux kernel oldi series[0] and derive several APIs from it to determine the dual link pixel order
- Addtidss_oldi_init()and helper routines to handle OLDI-specific setup and move related helper routines totidss_oldi.c[0]: https://lore.kernel.org/all/[email protected]/
Reviewed-by Devarsh Thakkar <[email protected]>Signed-off-by Swamil Jain <[email protected]>--- drivers/video/tidss/Makefile | 2 +- drivers/video/tidss/tidss_drv.c | 235 +++++++++++++------- drivers/video/tidss/tidss_drv.h | 40 ++-- drivers/video/tidss/tidss_oldi.c | 364 +++++++++++++++++++++++++++++++ drivers/video/tidss/tidss_oldi.h | 72 ++++++ drivers/video/tidss/tidss_regs.h | 21 -- 6 files changed, 612 insertions(+), 122 deletions(-)Quoted 2 lines
create mode 100644
drivers/video/tidss/tidss_oldi.ccreate mode 100644drivers/video/tidss/tidss_oldi.h
Quoted 2 lines
You didn't include my feedback about making sure this either builds on sandbox or updates the
Kconfigto have appropriate dependencies.
From our previous conversation, I wasn't able to get the exact point. Thanks for elaborating the issue.
I
Quoted 11 lines
checked the build failure more, and we fail to build this on sandbox (and so allyesconfig) because <
asm/utils.h> doesn't exist on sandbox, but also isn't needed here. It really is only needed in two files because it only defines what should be generic math header functions. So, here's my request. In a follow up patch, please do either of:
- Remove <asm/utils.h> from everything that doesn't call log_2_n_round_{up,down}.
- Removearch/arm/include/asm/utils.hand replace the calls of log_2_n_round_(up,down} with what must be the common linux kernel equivalent that's been added in the last 15 years.
Quoted 2 lines
Thanks.
Thanks, will do the required changes and re-spin the series.
Regards,
Swamil
PATCH RESEND v3 2/2 configs: am62x_evm_a53_defconfig: Enable A53 splashscreen at u-boot SPL
In reply to Swamil JainFrom: Devarsh Thakkar <[email protected]>
Enable A53 splashscreen at u-boot SPL stage. SPL_MAX_SIZE is bumped up to 0x80000 to accommodate splash related code. Bloblist related macros are enabled to preserve splash context till u-boot proper. SPL Board initialization Kconfig is set to dynamically update simple-framebuffer and reserved-memory DT nodes before kernel bootup.
--- configs/am62x_a53_splashscreen.config | 16 ++++++++++++++++ configs/am62x_evm_a53_defconfig | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 configs/am62x_a53_splashscreen.config
configs/am62x_a53_splashscreen.config new file +16 -0
@@ -0,0 +1,16 @@ +CONFIG_FDT_SIMPLEFB=y +CONFIG_VIDEO=y +CONFIG_SYS_WHITE_ON_BLACK=y +CONFIG_SPL_VIDEO_TIDSS=y +CONFIG_BMP_24BPP=y +CONFIG_BMP_32BPP=y +CONFIG_SPL_VIDEO=y +CONFIG_SPL_SPLASH_SCREEN=y +CONFIG_SPL_SYS_WHITE_ON_BLACK=y +CONFIG_SPL_SPLASH_SCREEN_ALIGN=y +CONFIG_SPL_SPLASH_SOURCE=y +CONFIG_SPL_BMP=y +CONFIG_SPL_VIDEO_BMP_GZIP=y +CONFIG_SPL_BMP_24BPP=y +CONFIG_SPL_BMP_32BPP=y +CONFIG_SPL_HIDE_LOGO_VERSION=y
configs/am62x_evm_a53_defconfig +3 -1
@@ -24,7 +24,7 @@ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x80c80000 CONFIG_SPL_BSS_MAX_SIZE=0x80000 CONFIG_SPL_STACK_R=y -CONFIG_SPL_SIZE_LIMIT=0x40000 +CONFIG_SPL_SIZE_LIMIT=0x80000 CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x800 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y
@@ -88,6 +88,7 @@ CONFIG_DM_I2C=y CONFIG_SYS_I2C_OMAP24XX=y CONFIG_DM_MAILBOX=y CONFIG_K3_SEC_PROXY=y +CONFIG_FS_LOADER=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_MMC_IO_VOLTAGE=y CONFIG_SPL_MMC_IO_VOLTAGE=y
@@ -143,3 +144,4 @@ CONFIG_EFI_SET_TIME=y #include <configs/k3_efi_capsule.config> #include <configs/am62x_a53_usbdfu.config> +#include <configs/am62x_a53_splashscreen.config>
Re: [RESEND PATCH v3 2/2] configs: am62x_evm_a53_defconfig: Enable A53 splashscreen at u-boot SPL
Quoted 52 lines · Swamil Jain
From: Devarsh Thakkar <[email protected]>
Enable A53 splashscreen at u-boot SPL stage.
SPL_MAX_SIZEis bumped up to0x80000to accommodate splash related code. Bloblist related macros are enabled to preserve splash context till u-boot proper. SPL Board initializationKconfigis set to dynamically update simple-framebuffer and reserved-memory DT nodes before kernel bootup.Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Swamil Jain <[email protected]>--- configs/am62x_a53_splashscreen.config | 16 ++++++++++++++++ configs/am62x_evm_a53_defconfig | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-)create mode 100644
configs/am62x_a53_splashscreen.configconfigs/am62x_a53_splashscreen.config new file +16
-0@@ -0,0 +1,16 @@ +CONFIG_FDT_SIMPLEFB=y +CONFIG_VIDEO=y +CONFIG_SYS_WHITE_ON_BLACK=y +CONFIG_SPL_VIDEO_TIDSS=y +CONFIG_BMP_24BPP=y +CONFIG_BMP_32BPP=y +CONFIG_SPL_VIDEO=y +CONFIG_SPL_SPLASH_SCREEN=y +CONFIG_SPL_SYS_WHITE_ON_BLACK=y +CONFIG_SPL_SPLASH_SCREEN_ALIGN=y +CONFIG_SPL_SPLASH_SOURCE=y +CONFIG_SPL_BMP=y +CONFIG_SPL_VIDEO_BMP_GZIP=y +CONFIG_SPL_BMP_24BPP=y +CONFIG_SPL_BMP_32BPP=y +CONFIG_SPL_HIDE_LOGO_VERSION=yconfigs/am62x_evm_a53_defconfig +1
-1@@ -24,7 +24,7 @@ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x80c80000 CONFIG_SPL_BSS_MAX_SIZE=0x80000 CONFIG_SPL_STACK_R=y -CONFIG_SPL_SIZE_LIMIT=0x40000 +CONFIG_SPL_SIZE_LIMIT=0x80000 CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x800 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y
configs/am62x_evm_a53_defconfig CONFIG_DM_I2C=y · line 91
Quoted 4 lines
configs/am62x_evm_a53_defconfig +1
-0@@ -88,6 +88,7 @@ CONFIG_DM_I2C=y CONFIG_SYS_I2C_OMAP24XX=y CONFIG_DM_MAILBOX=y CONFIG_K3_SEC_PROXY=y +CONFIG_FS_LOADER=y
Why not put this in the config fragment?
configs/am62x_evm_a53_defconfig CONFIG_EFI_SET_TIME=y · line 147
Quoted 9 lines
configs/am62x_evm_a53_defconfig +1
-0CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_MMC_IO_VOLTAGE=y CONFIG_SPL_MMC_IO_VOLTAGE=y@@ -143,3 +144,4 @@ CONFIG_EFI_SET_TIME=y #include <configs/k3_efi_capsule.config> #include <configs/am62x_a53_usbdfu.config> +#include <configs/am62x_a53_splashscreen.config>
Fix this and your tools to not allow it.
Andrew
Re: [RESEND PATCH v3 2/2] configs: am62x_evm_a53_defconfig: Enable A53 splashscreen at u-boot SPL
Hi Andrew,
Quoted 51 lines · Andrew Davis
Quoted 50 lines · Swamil Jain
From: Devarsh Thakkar <[email protected]>
Enable A53 splashscreen at u-boot SPL stage.
SPL_MAX_SIZEis bumped up to0x80000to accommodate splash related code. Bloblist related macros are enabled to preserve splash context till u-boot proper. SPL Board initializationKconfigis set to dynamically update simple-framebuffer and reserved-memory DT nodes before kernel bootup.Signed-off-by Devarsh Thakkar <[email protected]>Signed-off-by Swamil Jain <[email protected]>---
configs/am62x_a53_splashscreen.config| 16 ++++++++++++++++ configs/am62x_evm_a53_defconfig | 4 +++-2 files changed, 19 insertions(+), 1 deletion(-)create mode 100644
configs/am62x_a53_splashscreen.configconfigs/am62x_a53_splashscreen.config new file +16
-0@@ -0,0 +1,16 @@ +CONFIG_FDT_SIMPLEFB=y +CONFIG_VIDEO=y +CONFIG_SYS_WHITE_ON_BLACK=y +CONFIG_SPL_VIDEO_TIDSS=y +CONFIG_BMP_24BPP=y +CONFIG_BMP_32BPP=y +CONFIG_SPL_VIDEO=y +CONFIG_SPL_SPLASH_SCREEN=y +CONFIG_SPL_SYS_WHITE_ON_BLACK=y +CONFIG_SPL_SPLASH_SCREEN_ALIGN=y +CONFIG_SPL_SPLASH_SOURCE=y +CONFIG_SPL_BMP=y +CONFIG_SPL_VIDEO_BMP_GZIP=y +CONFIG_SPL_BMP_24BPP=y +CONFIG_SPL_BMP_32BPP=y +CONFIG_SPL_HIDE_LOGO_VERSION=yconfigs/am62x_evm_a53_defconfig +0
-0@@ -24,7 +24,7 @@ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
CONFIG_SPL_BSS_START_ADDR=0x80c80000
CONFIG_SPL_BSS_MAX_SIZE=0x80000
CONFIG_SPL_STACK_R=yconfigs/am62x_evm_a53_defconfig +1
-1-CONFIG_SPL_SIZE_LIMIT=0x40000 +CONFIG_SPL_SIZE_LIMIT=0x80000
CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x800
CONFIG_SPL_FS_FAT=y
Quoted 8 lines
Quoted 6 lines
CONFIG_SPL_LIBDISK_SUPPORT=yconfigs/am62x_evm_a53_defconfig +0
-0@@ -88,6 +88,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_OMAP24XX=y
CONFIG_DM_MAILBOX=y
CONFIG_K3_SEC_PROXY=y
+CONFIG_FS_LOADER=yWhy not put this in the config fragment?
Yeah, its better to put it in config fragment, will do in v4.
Quoted 12 lines
configs/am62x_evm_a53_defconfig CONFIG_EFI_SET_TIME=y · line 146
Quoted 9 lines
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_IO_VOLTAGE=y
CONFIG_SPL_MMC_IO_VOLTAGE=yconfigs/am62x_evm_a53_defconfig +1
-0@@ -143,3 +144,4 @@ CONFIG_EFI_SET_TIME=y #include <configs/k3_efi_capsule.config> #include <configs/am62x_a53_usbdfu.config> +#include <configs/am62x_a53_splashscreen.config>Fix this and your tools to not allow it.
Sure, Thanks!!
Regards,
Swamil
Quoted 1 line
Andrew