[PATCH 0/2] patches used to enable u-boot video driver on raspberry pi 4B platform

From: Meng Li meng.li@windriver.com
There are 2 patches as bleow: 0001-bcm2835-Add-simiple-framebuffer-for-use-with-fkms.patch 0002-rpi-set-the-correct-parameter-for-simple-framebuffer.patch The first one is used to enable u-boot video driver. The second one is used to fix the wired display status on monitor.
Jason Wessel (1): bcm2835: Add simiple-framebuffer for use with fkms
Meng Li (1): rpi: set the correct parameter for simple framebuffer node
board/raspberrypi/rpi/rpi.c | 2 ++ drivers/video/bcm2835.c | 3 +++ 2 files changed, 5 insertions(+)

From: Jason Wessel jason.wessel@windriver.com
When the fkms dtb overlay is used only the simple-framebuffer is presented as a usable video display. So, add "simple-framebuffer" compatible to enable video driver bcm2835.
Signed-off-by: Jason Wessel jason.wessel@windriver.com Signed-off-by: Meng Li Meng.Li@windriver.com --- drivers/video/bcm2835.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c index c2962932c9..9078755c76 100644 --- a/drivers/video/bcm2835.c +++ b/drivers/video/bcm2835.c @@ -54,6 +54,9 @@ static const struct udevice_id bcm2835_video_ids[] = { { .compatible = "brcm,bcm2835-hdmi" }, { .compatible = "brcm,bcm2711-hdmi0" }, { .compatible = "brcm,bcm2708-fb" }, +#ifndef CONFIG_VIDEO_DT_SIMPLEFB + { .compatible = "simple-framebuffer" }, +#endif { } };

When raspberrpi-4b platform boots up, there are 2 sets of same bootup log displayed on HDMI monitor screen, it looks like the screen is split into 2 parts. The root cause is that video format of u-boot is different from kernel. The fixing "a8r8g8b8" video format is used in u-boot, but "r5g6b5" video format from framebuffer node is used in kernel image. In order to avoid weird display status on screen, it needs to set the correct parameter for simple framebuffer node even if it has existed.
Signed-off-by: Meng Li Meng.Li@windriver.com --- board/raspberrypi/rpi/rpi.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 1057ebb994..38bcab15cf 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -561,6 +561,8 @@ int ft_board_setup(void *blob, struct bd_info *bd) node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer"); if (node < 0) fdt_simplefb_add_node(blob); + else + fdt_simplefb_enable_and_mem_rsv(blob);
#ifdef CONFIG_EFI_LOADER /* Reserve the spin table */

On Wed, 26 Jul 2023 10:42:33 +0800 Meng Li Meng.Li@windriver.com wrote:
From: Meng Li meng.li@windriver.com
There are 2 patches as bleow: 0001-bcm2835-Add-simiple-framebuffer-for-use-with-fkms.patch 0002-rpi-set-the-correct-parameter-for-simple-framebuffer.patch The first one is used to enable u-boot video driver. The second one is used to fix the wired display status on monitor.
Jason Wessel (1): bcm2835: Add simiple-framebuffer for use with fkms
Meng Li (1): rpi: set the correct parameter for simple framebuffer node
board/raspberrypi/rpi/rpi.c | 2 ++ drivers/video/bcm2835.c | 3 +++ 2 files changed, 5 insertions(+)
applied to u-boot-video/master, thanks!
-- Anatolij
participants (2)
-
Anatolij Gustschin
-
Meng Li