WIP: Nokia RX-51: Convert to CONFIG_DM_VIDEO
PATCH 1/1 WIP: Nokia RX-51: Convert to CONFIG_DM_VIDEO
---
I had to comment "return -ENOSPC;" in video-uclass.c because without it DM_VIDEO does not work and I do not know why. This looks like either false-positive test or a bug in DM_VIDEO code. I have already set PRE_RELOC flag but it has no effect on that code.
Second thing is that CONFIG_VIDEO_LOGO is broken and does not work even it is enabled in config file. I do not know why too.
Any idea?
Othwise framebuffer works.
--- board/nokia/rx51/rx51.c | 41 ++++++++++++++++++++++-------------- configs/nokia_rx51_defconfig | 7 ++++-- drivers/video/video-uclass.c | 4 +++- include/configs/nokia_rx51.h | 11 ++-------- 4 files changed, 35 insertions(+), 28 deletions(-)
board/nokia/rx51/rx51.c +25 -16
@@ -30,7 +30,7 @@#include <malloc.h> #include <twl4030.h> #include <i2c.h> -#include <video_fb.h> +#include <video.h> #include <keyboard.h> #include <asm/global_data.h> #include <asm/io.h>
@@ -62,8 +62,6 @@ struct emu_hal_params_rx51 {DECLARE_GLOBAL_DATA_PTR ; -GraphicDevice gdev; -const omap3_sysinfo sysinfo = {DDR_STACKED ,"Nokia RX-51" ,
@@ -342,22 +340,29 @@ void setup_board_tags(struct tag **in_params) *in_params = params; } -/* -* Routine: video_hw_init -* Description: Set up the GraphicDevice depending on sys_boot. -*/ -void *video_hw_init (void ) +static int rx51_video_probe (struct udevice *dev) { -/* fill in Graphic Device */ - gdev.frameAdrs =0x8f9c0000 ; - gdev.winSizeX =800 ; - gdev.winSizeY =480 ; - gdev.gdfBytesPP =2 ; - gdev.gdfIndex =GDF_16BIT_565RGB ; -memset ((void *)gdev.frameAdrs,0 ,0xbb800 ); -return (void *) &gdev; +struct video_uc_plat *uc_plat =dev_get_uclass_plat (dev); +struct video_priv *uc_priv =dev_get_uclass_priv (dev); + + uc_plat->base =0x8f9c0000 ; + uc_plat->size =800 *480 *sizeof (u16); + uc_priv->xsize =800 ; + uc_priv->ysize =480 ; + uc_priv->bpix =VIDEO_BPP16 ; + +video_set_flush_dcache (dev, true); + +return 0 ; } +U_BOOT_DRIVER (rx51_video) = { + .name ="rx51_video" , + .id =UCLASS_VIDEO , + .probe = rx51_video_probe, + .flags =DM_FLAG_PRE_RELOC , +}; +/* * Routine: twl4030_regulator_set_mode * Description: Set twl4030 regulator mode over i2c powerbus.
@@ -777,6 +782,10 @@ U_BOOT_DRVINFOS(rx51_watchdog) = { { "rx51_watchdog" }, }; +U_BOOT_DRVINFOS (rx51_video) = { + {"rx51_video" }, +}; +U_BOOT_DRVINFOS (rx51_kp) = { {"rx51_kp" }, };
configs/nokia_rx51_defconfig +5 -2
@@ -77,8 +77,11 @@ CONFIG_SPI=y CONFIG_USB=y CONFIG_USB_MUSB_UDC=y CONFIG_USB_OMAP3=y -CONFIG_CFB_CONSOLE=y -CONFIG_CFB_CONSOLE_ANSI=y +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_LOGO=y +# CONFIG_VIDEO_BPP8 is not set +# CONFIG_VIDEO_BPP32 is not set +CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_SPLASH_SCREEN=y CONFIG_WATCHDOG_TIMEOUT_MSECS=31000 CONFIG_WDT=y
drivers/video/video-uclass.c +3 -1
@@ -3,6 +3,8 @@* Copyright (c) 2015 Google, Inc */ +#define DEBUG +#define LOG_CATEGORY UCLASS_VIDEO#include <common.h>
@@ -438,7 +440,7 @@ static int video_post_bind(struct udevice *dev)*/ printf ("Video device '%s' cannot allocate frame buffer memory -ensure the device is set up before relocation\n" , dev->name); -return -ENOSPC ; +// return -ENOSPC; }debug ("%s: Claiming %lx bytes at %lx for video device '%s'\n" , __func__, size, addr, dev->name);
include/configs/nokia_rx51.h +2 -9
@@ -70,19 +70,12 @@#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP -/* -* Framebuffer -*/ -/* Video console */ -#define VIDEO_FB_16BPP_PIXEL_SWAP -#define VIDEO_FB_16BPP_WORD_SWAP -/* Environment information */ #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ "stdin=usbtty,serial,keyboard\0" \ - "stdout=usbtty,serial,vga\0" \ - "stderr=usbtty,serial,vga\0" \ + "stdout=usbtty,serial,vidconsole\0" \ + "stderr=usbtty,serial,vidconsole\0" \ "slide=gpio input " __stringify(GPIO_SLIDE) "\0" \ "switchmmc=mmc dev ${mmcnum}\0" \ "kernaddr=0x82008000\0" \
Signature · 1 line
2.20.1
Hi Pali,
Quoted 5 lines · On Wed, 16 Feb 2022 21:42:19 +0100 Pali Rohár [email protected] wrote:
---
I had to comment "return-ENOSPC;" invideo-uclass.cbecause without itDM_VIDEOdoes not work and I do not know why. This looks like either false-positive test or a bug inDM_VIDEOcode. I have already setPRE_RELOCflag but it has no effect on that code.
Probably the frame buffer memory allocation did not work. Could you please try with a bind callback, i.e.:
static int rx51_video_bind(struct udevice *dev)
{
struct video_uc_plat *plat = dev_get_uclass_plat(dev);
plat->size = 800 * 480 * 2;
return 0;
}
...
U_BOOT_DRIVER(rx51_video) = {
.name = "rx51_video",
.id = UCLASS_VIDEO,
.bind = rx51_video_bind,
.probe = rx51_video_probe,
.flags = DM_FLAG_PRE_RELOC,
};Quoted 5 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
--
Anatolij
Quoted 15 lines · On Thursday 17 February 2022 09:53:39 Anatolij Gustschin wrote:
Hi Pali,
Quoted 5 lines · On Wed, 16 Feb 2022 21:42:19 +0100 Pali Rohár [email protected] wrote:
---
I had to comment "return-ENOSPC;" invideo-uclass.cbecause without itDM_VIDEOdoes not work and I do not know why. This looks like either false-positive test or a bug inDM_VIDEOcode. I have already setPRE_RELOCflag but it has no effect on that code.Probably the frame buffer memory allocation did not work. Could you please try with a bind callback, i.e.:
static int
rx51_video_bind(struct udevice *dev)
Quoted 14 lines
{
struct video_uc_plat *plat = dev_get_uclass_plat(dev);
plat->size = 800 * 480 * 2;
return 0;
}
...
U_BOOT_DRIVER(rx51_video) = {
.name = "rx51_video",
.id = UCLASS_VIDEO,
.bind = rx51_video_bind,
.probe = rx51_video_probe,
.flags = DM_FLAG_PRE_RELOC,
};Hello! It does not work too. Here is the output:
U-Boot 2022.04-rc2-00002-ga2c1a9878375-dirty (Jan 01 1970 - 00:00:00 +0000)
OMAP35XX-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 MHz
DRAM: Video frame buffers from 8fe30000 to 8fe30000
256 MiB
Video device 'rx51_video' cannot allocate frame buffer memory -ensure the device is set up before relocation
If "return -ENOSPC;" is not commented then this is the last printed line. If it is commented then output continues with:
video_post_bind: Claiming 130000 bytes at 8fd00000 for video device 'rx51_video'
And framebuffer is working fine like without above rx51_video_bind() change.
Quoted 12 lines
Quoted 5 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
--
Anatolij
PING?
Quoted 60 lines · On Thursday 17 February 2022 13:20:43 Pali Rohár wrote:
Quoted 15 lines · On Thursday 17 February 2022 09:53:39 Anatolij Gustschin wrote:
Hi Pali,
Quoted 5 lines · On Wed, 16 Feb 2022 21:42:19 +0100 Pali Rohár [email protected] wrote:
---
I had to comment "return-ENOSPC;" invideo-uclass.cbecause without itDM_VIDEOdoes not work and I do not know why. This looks like either false-positive test or a bug inDM_VIDEOcode. I have already setPRE_RELOCflag but it has no effect on that code.Probably the frame buffer memory allocation did not work. Could you please try with a bind callback, i.e.:
static int
rx51_video_bind(struct udevice *dev)Quoted 14 lines
{ struct video_uc_plat *plat = dev_get_uclass_plat(dev); plat->size = 800 * 480 * 2; return 0; } ... U_BOOT_DRIVER(rx51_video) = { .name = "rx51_video", .id = UCLASS_VIDEO, .bind = rx51_video_bind, .probe = rx51_video_probe, .flags = DM_FLAG_PRE_RELOC, };Hello! It does not work too. Here is the output:
U-Boot 2022.04-rc2-00002-ga2c1a9878375-dirty (Jan 01 1970 - 00:00:00 +0000)
OMAP35XX-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 MHz
DRAM: Video frame buffers from8fe30000to8fe30000
256 MiB
Video device 'rx51_video' cannot allocate frame buffer memory -ensure the device is set up before relocationIf "return
-ENOSPC;" is not commented then this is the last printed line. If it is commented then output continues with:
video_post_bind: Claiming 130000 bytes at8fd00000for video device 'rx51_video'And framebuffer is working fine like without above
rx51_video_bind()change.Quoted 12 lines
Quoted 5 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
--
Anatolij
Hi Pali,
Quoted 51 lines · Pali Rohár
PING?
Quoted 47 lines · On Thursday 17 February 2022 13:20:43 Pali Rohár wrote:
Quoted 15 lines · On Thursday 17 February 2022 09:53:39 Anatolij Gustschin wrote:
Hi Pali,
Quoted 5 lines · On Wed, 16 Feb 2022 21:42:19 +0100 Pali Rohár [email protected] wrote:
---
I had to comment "return-ENOSPC;" invideo-uclass.cbecause without itDM_VIDEOdoes not work and I do not know why. This looks like either false-positive test or a bug inDM_VIDEOcode. I have already setPRE_RELOCflag but it has no effect on that code.Probably the frame buffer memory allocation did not work. Could you please try with a bind callback, i.e.:
static int
rx51_video_bind(struct udevice *dev)Quoted 14 lines
{ struct video_uc_plat *plat = dev_get_uclass_plat(dev); plat->size = 800 * 480 * 2; return 0; } ... U_BOOT_DRIVER(rx51_video) = { .name = "rx51_video", .id = UCLASS_VIDEO, .bind = rx51_video_bind, .probe = rx51_video_probe, .flags = DM_FLAG_PRE_RELOC, };Hello! It does not work too. Here is the output:
U-Boot 2022.04-rc2-00002-ga2c1a9878375-dirty (Jan 01 1970 - 00:00:00 +0000)
OMAP35XX-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 MHz
DRAM: Video frame buffers from8fe30000to8fe30000
256 MiB
Video device 'rx51_video' cannot allocate frame buffer memory -ensure the device is set up before relocationIf "return
-ENOSPC;" is not commented then this is the last printed line. If it is commented then output continues with:
video_post_bind: Claiming 130000 bytes at8fd00000for video device 'rx51_video'And framebuffer is working fine like without above
rx51_video_bind()change.
It looks like you are hard-coding the address of the video buffers. Is that intentional? If so, you may need to disable U-Boot's automatic allocation.
One way to do that is to set the frame buffer address and size in your bind() routine (post relocation) and update video_post_bind() to check if the address is non-zero (plat->base I mean) and skip its allocation if so.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
Can you be more specific than 'broken'? What is broken about it?
Regards,
Simon
Quoted 50 lines · On Sunday 06 March 2022 05:51:34 Simon Glass wrote:
Hi Pali,
Quoted 47 lines · Pali Rohár
PING?
Quoted 43 lines · On Thursday 17 February 2022 13:20:43 Pali Rohár wrote:
Quoted 15 lines · On Thursday 17 February 2022 09:53:39 Anatolij Gustschin wrote:
Hi Pali,
Quoted 5 lines · On Wed, 16 Feb 2022 21:42:19 +0100 Pali Rohár [email protected] wrote:
---
I had to comment "return-ENOSPC;" invideo-uclass.cbecause without itDM_VIDEOdoes not work and I do not know why. This looks like either false-positive test or a bug inDM_VIDEOcode. I have already setPRE_RELOCflag but it has no effect on that code.Probably the frame buffer memory allocation did not work. Could you please try with a bind callback, i.e.:
static int
rx51_video_bind(struct udevice *dev)Quoted 14 lines
{ struct video_uc_plat *plat = dev_get_uclass_plat(dev); plat->size = 800 * 480 * 2; return 0; } ... U_BOOT_DRIVER(rx51_video) = { .name = "rx51_video", .id = UCLASS_VIDEO, .bind = rx51_video_bind, .probe = rx51_video_probe, .flags = DM_FLAG_PRE_RELOC, };Hello! It does not work too. Here is the output:
U-Boot 2022.04-rc2-00002-ga2c1a9878375-dirty (Jan 01 1970 - 00:00:00 +0000)
OMAP35XX-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 MHz
DRAM: Video frame buffers from8fe30000to8fe30000
256 MiB
Video device 'rx51_video' cannot allocate frame buffer memory -ensure the device is set up before relocationIf "return
-ENOSPC;" is not commented then this is the last printed line. If it is commented then output continues with:
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
video_post_bind: Claiming 130000 bytes at8fd00000for video device 'rx51_video'And framebuffer is working fine like without above
rx51_video_bind()change.It looks like you are hard-coding the address of the video buffers. Is that intentional? If so, you may need to disable U-Boot's automatic allocation.
This is how it works, signed bootloader which loads U-Boot initialize and prepare framebuffer.
Quoted 4 lines
One way to do that is to set the frame buffer address and size in your
bind()routine (post relocation) and updatevideo_post_bind()to check if the address is non-zero (plat->baseI mean) and skip its allocation if so.
Ok, I have tried it and following change makes framebuffer in qemu working:
drivers/video/video-uclass.c +3 -0
@@ -78,6 +80,9 @@ static ulong alloc_fb(struct udevice *dev, ulong *addrp)if (!plat->size)return 0 ; +if (plat->base) +return 0 ; + align = plat->align ? plat->align :1 <<20 ; base = *addrp - plat->size; base &= ~(align -1 );
Is this what you mean?
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
Can you be more specific than 'broken'? What is broken about it?
Does not work, logo is not drown on the screen.
Hi Pali,
Quoted 77 lines · Pali Rohár
Quoted 50 lines · On Sunday 06 March 2022 05:51:34 Simon Glass wrote:
Hi Pali,
Quoted 47 lines · Pali Rohár
PING?
Quoted 43 lines · On Thursday 17 February 2022 13:20:43 Pali Rohár wrote:
Quoted 15 lines · On Thursday 17 February 2022 09:53:39 Anatolij Gustschin wrote:
Hi Pali,
Quoted 5 lines · On Wed, 16 Feb 2022 21:42:19 +0100 Pali Rohár [email protected] wrote:
---
I had to comment "return-ENOSPC;" invideo-uclass.cbecause without itDM_VIDEOdoes not work and I do not know why. This looks like either false-positive test or a bug inDM_VIDEOcode. I have already setPRE_RELOCflag but it has no effect on that code.Probably the frame buffer memory allocation did not work. Could you please try with a bind callback, i.e.:
static int
rx51_video_bind(struct udevice *dev)Quoted 14 lines
{ struct video_uc_plat *plat = dev_get_uclass_plat(dev); plat->size = 800 * 480 * 2; return 0; } ... U_BOOT_DRIVER(rx51_video) = { .name = "rx51_video", .id = UCLASS_VIDEO, .bind = rx51_video_bind, .probe = rx51_video_probe, .flags = DM_FLAG_PRE_RELOC, };Hello! It does not work too. Here is the output:
U-Boot 2022.04-rc2-00002-ga2c1a9878375-dirty (Jan 01 1970 - 00:00:00 +0000)
OMAP35XX-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 MHz
DRAM: Video frame buffers from8fe30000to8fe30000
256 MiB
Video device 'rx51_video' cannot allocate frame buffer memory -ensure the device is set up before relocationIf "return
-ENOSPC;" is not commented then this is the last printed line. If it is commented then output continues with:Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
video_post_bind: Claiming 130000 bytes at8fd00000for video device 'rx51_video'And framebuffer is working fine like without above
rx51_video_bind()change.It looks like you are hard-coding the address of the video buffers. Is that intentional? If so, you may need to disable U-Boot's automatic allocation.
This is how it works, signed bootloader which loads U-Boot initialize and prepare framebuffer.
Quoted 4 lines
One way to do that is to set the frame buffer address and size in your
bind()routine (post relocation) and updatevideo_post_bind()to check if the address is non-zero (plat->baseI mean) and skip its allocation if so.Ok, I have tried it and following change makes framebuffer in qemu working:
drivers/video/video-uclass.c +0
-0
drivers/video/video-uclass.c static ulong alloc_fb(struct udevice *dev, ulong *addrp) · line 85
Quoted 6 lines
drivers/video/video-uclass.c +3
-0@@ -78,6 +80,9 @@ static ulong alloc_fb(struct udevice *dev, ulong *addrp)if (!plat->size)return 0 ; +if (plat->base) +return 0 ; +
Yes let's go with that.
Quoted 13 lines
drivers/video/video-uclass.c +0
-0align = plat->align ? plat->align :1 <<20 ; base = *addrp - plat->size; base &= ~(align -1 );Is this what you mean?
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.Any idea?
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
Can you be more specific than 'broken'? What is broken about it?
Does not work, logo is not drown on the screen.
See video_bmp_display() - I wonder if the particular depth you are using is not supported? Anyway you should be able to debug it there or using the bmp command. The file is drivers/video/u_boot_logo.bmp
Regards,
Simon
PATCH 1/1 Nokia RX-51: Convert to CONFIG_DM_VIDEO
In reply to Pali RohárMechanically convert video_hw_init() function to UCLASS_VIDEO probe callback and replace CONFIG_CFB_CONSOLE by CONFIG_DM_VIDEO.
As framebuffer base address is setup by the bootloader which loads U-Boot, set it into plat->base. And do not allocate framebuffer in video_post_bind function when base address is already specified.
This change was tested in qemu n900 machine and is working fine.
What does not work is CONFIG_VIDEO_LOGO, seems to be buggy.
--- board/nokia/rx51/rx51.c | 40 +++++++++++++++++++++--------------- configs/nokia_rx51_defconfig | 7 +++++-- drivers/video/video-uclass.c | 3 +++ include/configs/nokia_rx51.h | 11 ++-------- 4 files changed, 34 insertions(+), 27 deletions(-)
board/nokia/rx51/rx51.c +24 -16
@@ -30,7 +30,7 @@#include <malloc.h> #include <twl4030.h> #include <i2c.h> -#include <video_fb.h> +#include <video.h> #include <keyboard.h> #include <asm/global_data.h> #include <asm/io.h>
@@ -62,8 +62,6 @@ struct emu_hal_params_rx51 {DECLARE_GLOBAL_DATA_PTR ; -GraphicDevice gdev; -const omap3_sysinfo sysinfo = {DDR_STACKED ,"Nokia RX-51" ,
@@ -342,22 +340,28 @@ void setup_board_tags(struct tag **in_params) *in_params = params; } -/* -* Routine: video_hw_init -* Description: Set up the GraphicDevice depending on sys_boot. -*/ -void *video_hw_init (void ) +static int rx51_video_probe (struct udevice *dev) { -/* fill in Graphic Device */ - gdev.frameAdrs =0x8f9c0000 ; - gdev.winSizeX =800 ; - gdev.winSizeY =480 ; - gdev.gdfBytesPP =2 ; - gdev.gdfIndex =GDF_16BIT_565RGB ; -memset ((void *)gdev.frameAdrs,0 ,0xbb800 ); -return (void *) &gdev; +struct video_uc_plat *uc_plat =dev_get_uclass_plat (dev); +struct video_priv *uc_priv =dev_get_uclass_priv (dev); + + uc_plat->base =0x8f9c0000 ; + uc_plat->size =800 *480 *sizeof (u16); + uc_priv->xsize =800 ; + uc_priv->ysize =480 ; + uc_priv->bpix =VIDEO_BPP16 ; + +video_set_flush_dcache (dev, true); + +return 0 ; } +U_BOOT_DRIVER (rx51_video) = { + .name ="rx51_video" , + .id =UCLASS_VIDEO , + .probe = rx51_video_probe, +}; +/* * Routine: twl4030_regulator_set_mode * Description: Set twl4030 regulator mode over i2c powerbus.
@@ -777,6 +781,10 @@ U_BOOT_DRVINFOS(rx51_watchdog) = { { "rx51_watchdog" }, }; +U_BOOT_DRVINFOS (rx51_video) = { + {"rx51_video" }, +}; +U_BOOT_DRVINFOS (rx51_kp) = { {"rx51_kp" }, };
configs/nokia_rx51_defconfig +5 -2
@@ -77,8 +77,11 @@ CONFIG_SPI=y CONFIG_USB=y CONFIG_USB_MUSB_UDC=y CONFIG_USB_OMAP3=y -CONFIG_CFB_CONSOLE=y -CONFIG_CFB_CONSOLE_ANSI=y +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_LOGO=y +# CONFIG_VIDEO_BPP8 is not set +# CONFIG_VIDEO_BPP32 is not set +CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_SPLASH_SCREEN=y CONFIG_WATCHDOG_TIMEOUT_MSECS=31000 CONFIG_WDT=y
drivers/video/video-uclass.c +3 -0
@@ -78,6 +78,9 @@ static ulong alloc_fb(struct udevice *dev, ulong *addrp)if (!plat->size)return 0 ; +if (plat->base) +return 0 ; + align = plat->align ? plat->align :1 <<20 ; base = *addrp - plat->size; base &= ~(align -1 );
include/configs/nokia_rx51.h +2 -9
@@ -70,19 +70,12 @@#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP -/* -* Framebuffer -*/ -/* Video console */ -#define VIDEO_FB_16BPP_PIXEL_SWAP -#define VIDEO_FB_16BPP_WORD_SWAP -/* Environment information */ #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ "stdin=usbtty,serial,keyboard\0" \ - "stdout=usbtty,serial,vga\0" \ - "stderr=usbtty,serial,vga\0" \ + "stdout=usbtty,serial,vidconsole\0" \ + "stderr=usbtty,serial,vidconsole\0" \ "slide=gpio input " __stringify(GPIO_SLIDE) "\0" \ "switchmmc=mmc dev ${mmcnum}\0" \ "kernaddr=0x82008000\0" \
Signature · 1 line
2.20.1
Quoted 1 line · On Sunday 06 March 2022 07:42:03 Simon Glass wrote:
Yes let's go with that.
Done, I sent final version of the patch.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Can you be more specific than 'broken'? What is broken about it?
Does not work, logo is not drown on the screen.
See
video_bmp_display()- I wonder if the particular depth you are using is not supported?
Depth is 16bit which should be supported.
Quoted 2 lines
Anyway you should be able to debug it there or
using the bmp command. The file isdrivers/video/u_boot_logo.bmp
CONFIG_CMD_BMP=y is broken too. When I enable it then U-Boot freeze after the line 'Loading Environment from <NULL>... OK'.
Re: [PATCH] Nokia RX-51: Convert to CONFIG_DM_VIDEO
In reply to Pali RohárHi Pali,
Quoted 55 lines · Pali Rohár
Mechanically convert
video_hw_init()function toUCLASS_VIDEOprobe callback and replaceCONFIG_CFB_CONSOLEbyCONFIG_DM_VIDEO.As framebuffer base address is setup by the bootloader which loads U-Boot, set it into
plat->base. And do not allocate framebuffer invideo_post_bindfunction when base address is already specified.This change was tested in qemu n900 machine and is working fine.
What does not work is
CONFIG_VIDEO_LOGO, seems to be buggy.Signed-off-by Pali Rohár <[email protected]>--- board/nokia/rx51/rx51.c | 40 +++++++++++++++++++++--------------- configs/nokia_rx51_defconfig | 7 +++++-- drivers/video/video-uclass.c | 3 +++ include/configs/nokia_rx51.h | 11 ++-------- 4 files changed, 34 insertions(+), 27 deletions(-)board/nokia/rx51/rx51.c +2
-10@@ -30,7 +30,7 @@#include <malloc.h> #include <twl4030.h> #include <i2c.h> -#include <video_fb.h> +#include <video.h> #include <keyboard.h> #include <asm/global_data.h> #include <asm/io.h> @@ -62,8 +62,6 @@ struct emu_hal_params_rx51 {DECLARE_GLOBAL_DATA_PTR ; -GraphicDevice gdev; -const omap3_sysinfo sysinfo = {DDR_STACKED ,"Nokia RX-51" ,@@ -342,22 +340,28 @@ void setup_board_tags(struct tag **in_params) *in_params = params; } -/* -* Routine: video_hw_init -* Description: Set up the GraphicDevice depending on sys_boot. -*/ -void *video_hw_init (void ) +static int rx51_video_probe (struct udevice *dev) { -/* fill in Graphic Device */ - gdev.frameAdrs =0x8f9c0000 ;
board/nokia/rx51/rx51.c void setup_board_tags(struct tag **in_params) · line 348
Quoted 10 lines
board/nokia/rx51/rx51.c +4
-6- gdev.winSizeX =800 ; - gdev.winSizeY =480 ; - gdev.gdfBytesPP =2 ; - gdev.gdfIndex =GDF_16BIT_565RGB ; -memset ((void *)gdev.frameAdrs,0 ,0xbb800 ); -return (void *) &gdev; +struct video_uc_plat *uc_plat =dev_get_uclass_plat (dev); +struct video_priv *uc_priv =dev_get_uclass_priv (dev); + + uc_plat->base =0x8f9c0000 ;
How is this calculated?
board/nokia/rx51/rx51.c void setup_board_tags(struct tag **in_params) · line 349
Quoted 1 line
board/nokia/rx51/rx51.c +1
-0+ uc_plat->size =800 *480 *sizeof (u16);
More correctly this should be in the bind() method, but in fact I don't think it matters. We can always adjust it later if needed.
Quoted 52 lines
board/nokia/rx51/rx51.c +17
-0+ uc_priv->xsize =800 ; + uc_priv->ysize =480 ; + uc_priv->bpix =VIDEO_BPP16 ; + +video_set_flush_dcache (dev, true); + +return 0 ; } +U_BOOT_DRIVER (rx51_video) = { + .name ="rx51_video" , + .id =UCLASS_VIDEO , + .probe = rx51_video_probe, +}; +/* * Routine: twl4030_regulator_set_mode * Description: Set twl4030 regulator mode over i2c powerbus. @@ -777,6 +781,10 @@ U_BOOT_DRVINFOS(rx51_watchdog) = { { "rx51_watchdog" }, }; +U_BOOT_DRVINFOS (rx51_video) = { + {"rx51_video" }, +}; +U_BOOT_DRVINFOS (rx51_kp) = { {"rx51_kp" }, };configs/nokia_rx51_defconfig +5
-2@@ -77,8 +77,11 @@ CONFIG_SPI=y CONFIG_USB=y CONFIG_USB_MUSB_UDC=y CONFIG_USB_OMAP3=y -CONFIG_CFB_CONSOLE=y -CONFIG_CFB_CONSOLE_ANSI=y +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_LOGO=y +# CONFIG_VIDEO_BPP8 is not set +# CONFIG_VIDEO_BPP32 is not set +CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_SPLASH_SCREEN=y CONFIG_WATCHDOG_TIMEOUT_MSECS=31000 CONFIG_WDT=ydrivers/video/video-uclass.c +0
-0
drivers/video/video-uclass.c static ulong alloc_fb(struct udevice *dev, ulong *addrp) · line 83
Quoted 6 lines
drivers/video/video-uclass.c +3
-0@@ -78,6 +78,9 @@ static ulong alloc_fb(struct udevice *dev, ulong *addrp)if (!plat->size)return 0 ; +if (plat->base) +return 0 ; +
How about a comment there like:
/* Allow drivers to allocate the frame buffer themselves */
Please put this change in its own video: patch and update the comment at the top of video-uclass.c and the comment for @base in video.h so the next person can figure this out.
Quoted 30 lines
drivers/video/video-uclass.c +0
-0align = plat->align ? plat->align :1 <<20 ; base = *addrp - plat->size; base &= ~(align -1 );include/configs/nokia_rx51.h +2
-10@@ -70,19 +70,12 @@#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP -/* -* Framebuffer -*/ -/* Video console */ -#define VIDEO_FB_16BPP_PIXEL_SWAP -#define VIDEO_FB_16BPP_WORD_SWAP -/* Environment information */ #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ "stdin=usbtty,serial,keyboard\0" \ - "stdout=usbtty,serial,vga\0" \ - "stderr=usbtty,serial,vga\0" \ + "stdout=usbtty,serial,vidconsole\0" \ + "stderr=usbtty,serial,vidconsole\0" \ "slide=gpio input " __stringify(GPIO_SLIDE) "\0" \ "switchmmc=mmc dev ${mmcnum}\0" \ "kernaddr=0x82008000\0" \ --
Quoted 2 lines
2.20.1
Regards,
Simon
Hi Pali,
Quoted 15 lines · Pali Rohár
Quoted 1 line · On Sunday 06 March 2022 07:42:03 Simon Glass wrote:
Yes let's go with that.
Done, I sent final version of the patch.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Can you be more specific than 'broken'? What is broken about it?
Does not work, logo is not drown on the screen.
See
video_bmp_display()- I wonder if the particular depth you are using is not supported?Depth is 16bit which should be supported.
But apparently isn't , at least in this case :-)
Quoted 6 lines
Quoted 3 lines
Anyway you should be able to debug it there or
using the bmp command. The file isdrivers/video/u_boot_logo.bmp
CONFIG_CMD_BMP=yis broken too. When I enable it then U-Boot freeze after the line 'Loading Environment from <NULL>... OK'.
OK I'm not sure why, but please investigate if you have time.
Regards,
Simon
Re: [PATCH] Nokia RX-51: Convert to CONFIG_DM_VIDEO
In reply to Simon GlassQuoted 14 lines · On Sunday 06 March 2022 11:43:21 Simon Glass wrote:
Quoted 13 lines · Pali Rohár
board/nokia/rx51/rx51.c +1
-11-/* -* Routine: video_hw_init -* Description: Set up the GraphicDevice depending on sys_boot. -*/ -void *video_hw_init (void ) +static int rx51_video_probe (struct udevice *dev) { -/* fill in Graphic Device */ - gdev.frameAdrs =0x8f9c0000 ; - gdev.winSizeX =800 ; - gdev.winSizeY =480 ; - gdev.gdfBytesPP =2 ; - gdev.gdfIndex =GDF_16BIT_565RGB ;
Quoted 8 lines
board/nokia/rx51/rx51.c void setup_board_tags(struct tag **in_params) · line 348
Quoted 6 lines
board/nokia/rx51/rx51.c +4
-2-memset ((void *)gdev.frameAdrs,0 ,0xbb800 ); -return (void *) &gdev; +struct video_uc_plat *uc_plat =dev_get_uclass_plat (dev); +struct video_priv *uc_priv =dev_get_uclass_priv (dev); + + uc_plat->base =0x8f9c0000 ;How is this calculated?
I do not remember. This seems to be fixed address set by the code which loads U-Boot. I do not have any notes about this stuff.
Quoted 4 lines
Quoted 1 line
+
uc_plat->size= 800 * 480 * sizeof(u16);More correctly this should be in the
bind()method, but in fact I don't think it matters. We can always adjust it later if needed.
Ok. I let it in probe, so all initialization is done at one place. If something is needed to adjust, it can be done later.
Quoted 20 lines · On Sunday 06 March 2022 11:44:22 Simon Glass wrote:
Hi Pali,
Quoted 17 lines · Pali Rohár
Quoted 1 line · On Sunday 06 March 2022 07:42:03 Simon Glass wrote:
Yes let's go with that.
Done, I sent final version of the patch.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
Can you be more specific than 'broken'? What is broken about it?
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Does not work, logo is not drown on the screen.
See
video_bmp_display()- I wonder if the particular depth you are using is not supported?Depth is 16bit which should be supported.
But apparently isn't , at least in this case :-)
Yea, something is broken there.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Anyway you should be able to debug it there or
using the bmp command. The file isdrivers/video/u_boot_logo.bmp
CONFIG_CMD_BMP=yis broken too. When I enable it then U-Boot freeze after the line 'Loading Environment from <NULL>... OK'.OK I'm not sure why, but please investigate if you have time.
I have looked at it and do not know. But probably it is because I somehow have not caught how this new video code works...
Anyway, I sent documentation update how to run u-boot for n900 in qemu:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
So it could help other people to look at issues which do not work correctly in n900's u-boot without need to have n900 hardware.
PATCH v2 1/2 video: Allow drivers to allocate the frame buffer themselves
In reply to Pali RohárWhen plat->base is set by driver then skip frame buffer reservation and allocation.
--- drivers/video/video-uclass.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/video/video-uclass.c +6 -1
@@ -33,7 +33,8 @@* information represents the requires size and alignment of the frame buffer * for the device. The values can be an over-estimate but cannot be too * small. The actual values will be suppled (in the same manner) by the bind() -* method after relocation. +* method after relocation. Additionally driver can allocate frame buffer +* itself by setting plat->base. * * This information is then picked up by video_reserve() which works out how * much memory is needed for all devices. This is allocated between
@@ -78,6 +79,10 @@ static ulong alloc_fb(struct udevice *dev, ulong *addrp)if (!plat->size)return 0 ; +/* Allow drivers to allocate the frame buffer themselves */ +if (plat->base) +return 0 ; + align = plat->align ? plat->align :1 <<20 ; base = *addrp - plat->size; base &= ~(align -1 );
Signature · 1 line
2.20.1
PATCH v2 2/2 Nokia RX-51: Convert to CONFIG_DM_VIDEO
Mechanically convert video_hw_init() function to UCLASS_VIDEO probe callback and replace CONFIG_CFB_CONSOLE by CONFIG_DM_VIDEO.
As framebuffer base address is setup by the bootloader which loads U-Boot, set plat->base to that fixed framebuffer address.
This change was tested in qemu n900 machine and is working fine.
What does not work is CONFIG_VIDEO_LOGO, seems to be buggy.
--- board/nokia/rx51/rx51.c | 40 +++++++++++++++++++++--------------- configs/nokia_rx51_defconfig | 7 +++++-- include/configs/nokia_rx51.h | 11 ++-------- 3 files changed, 31 insertions(+), 27 deletions(-)
board/nokia/rx51/rx51.c +24 -16
@@ -30,7 +30,7 @@#include <malloc.h> #include <twl4030.h> #include <i2c.h> -#include <video_fb.h> +#include <video.h> #include <keyboard.h> #include <asm/global_data.h> #include <asm/io.h>
@@ -62,8 +62,6 @@ struct emu_hal_params_rx51 {DECLARE_GLOBAL_DATA_PTR ; -GraphicDevice gdev; -const omap3_sysinfo sysinfo = {DDR_STACKED ,"Nokia RX-51" ,
@@ -342,22 +340,28 @@ void setup_board_tags(struct tag **in_params) *in_params = params; } -/* -* Routine: video_hw_init -* Description: Set up the GraphicDevice depending on sys_boot. -*/ -void *video_hw_init (void ) +static int rx51_video_probe (struct udevice *dev) { -/* fill in Graphic Device */ - gdev.frameAdrs =0x8f9c0000 ; - gdev.winSizeX =800 ; - gdev.winSizeY =480 ; - gdev.gdfBytesPP =2 ; - gdev.gdfIndex =GDF_16BIT_565RGB ; -memset ((void *)gdev.frameAdrs,0 ,0xbb800 ); -return (void *) &gdev; +struct video_uc_plat *uc_plat =dev_get_uclass_plat (dev); +struct video_priv *uc_priv =dev_get_uclass_priv (dev); + + uc_plat->base =0x8f9c0000 ; + uc_plat->size =800 *480 *sizeof (u16); + uc_priv->xsize =800 ; + uc_priv->ysize =480 ; + uc_priv->bpix =VIDEO_BPP16 ; + +video_set_flush_dcache (dev, true); + +return 0 ; } +U_BOOT_DRIVER (rx51_video) = { + .name ="rx51_video" , + .id =UCLASS_VIDEO , + .probe = rx51_video_probe, +}; +/* * Routine: twl4030_regulator_set_mode * Description: Set twl4030 regulator mode over i2c powerbus.
@@ -777,6 +781,10 @@ U_BOOT_DRVINFOS(rx51_watchdog) = { { "rx51_watchdog" }, }; +U_BOOT_DRVINFOS (rx51_video) = { + {"rx51_video" }, +}; +U_BOOT_DRVINFOS (rx51_kp) = { {"rx51_kp" }, };
configs/nokia_rx51_defconfig +5 -2
@@ -77,8 +77,11 @@ CONFIG_SPI=y CONFIG_USB=y CONFIG_USB_MUSB_UDC=y CONFIG_USB_OMAP3=y -CONFIG_CFB_CONSOLE=y -CONFIG_CFB_CONSOLE_ANSI=y +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_LOGO=y +# CONFIG_VIDEO_BPP8 is not set +# CONFIG_VIDEO_BPP32 is not set +CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_SPLASH_SCREEN=y CONFIG_WATCHDOG_TIMEOUT_MSECS=31000 CONFIG_WDT=y
include/configs/nokia_rx51.h +2 -9
@@ -70,19 +70,12 @@#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP -/* -* Framebuffer -*/ -/* Video console */ -#define VIDEO_FB_16BPP_PIXEL_SWAP -#define VIDEO_FB_16BPP_WORD_SWAP -/* Environment information */ #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ "stdin=usbtty,serial,keyboard\0" \ - "stdout=usbtty,serial,vga\0" \ - "stderr=usbtty,serial,vga\0" \ + "stdout=usbtty,serial,vidconsole\0" \ + "stderr=usbtty,serial,vidconsole\0" \ "slide=gpio input " __stringify(GPIO_SLIDE) "\0" \ "switchmmc=mmc dev ${mmcnum}\0" \ "kernaddr=0x82008000\0" \
Signature · 1 line
2.20.1
Hi Pali,
Quoted 41 lines · On Wed, 9 Mar 2022 20:44:50 +0100 Pali Rohár [email protected] wrote:
Quoted 20 lines · On Sunday 06 March 2022 11:44:22 Simon Glass wrote:
Hi Pali,
Quoted 17 lines · Pali Rohár
Quoted 1 line · On Sunday 06 March 2022 07:42:03 Simon Glass wrote:
Yes let's go with that.
Done, I sent final version of the patch.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
Can you be more specific than 'broken'? What is broken about it?
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Does not work, logo is not drown on the screen.
See
video_bmp_display()- I wonder if the particular depth you are using is not supported?Depth is 16bit which should be supported.
But apparently isn't , at least in this case :-)
Yea, something is broken there.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Anyway you should be able to debug it there or
using the bmp command. The file isdrivers/video/u_boot_logo.bmp
CONFIG_CMD_BMP=yis broken too. When I enable it then U-Boot freeze after the line 'Loading Environment from <NULL>... OK'.OK I'm not sure why, but please investigate if you have time.
Quoted 8 lines
I have looked at it and do not know. But probably it is because I somehow have not caught how this new video code works...
Anyway, I sent documentation update how to run u-boot for n900 in qemu:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/So it could help other people to look at issues which do not work correctly in n900's u-boot without need to have n900 hardware.
I've tested your v2 patches, and logo drawing works, but the logo appears for short time. Then it is later overwritten by boot menu.
--
Anatolij
Quoted 52 lines · On Wednesday 09 March 2022 23:20:11 Anatolij Gustschin wrote:
Hi Pali,
Quoted 47 lines · On Wed, 9 Mar 2022 20:44:50 +0100 Pali Rohár [email protected] wrote:
Quoted 20 lines · On Sunday 06 March 2022 11:44:22 Simon Glass wrote:
Hi Pali,
Quoted 17 lines · Pali Rohár
Quoted 1 line · On Sunday 06 March 2022 07:42:03 Simon Glass wrote:
Yes let's go with that.
Done, I sent final version of the patch.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
Can you be more specific than 'broken'? What is broken about it?
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Does not work, logo is not drown on the screen.
See
video_bmp_display()- I wonder if the particular depth you are using is not supported?Depth is 16bit which should be supported.
But apparently isn't , at least in this case :-)
Yea, something is broken there.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Anyway you should be able to debug it there or
using the bmp command. The file isdrivers/video/u_boot_logo.bmp
CONFIG_CMD_BMP=yis broken too. When I enable it then U-Boot freeze after the line 'Loading Environment from <NULL>... OK'.OK I'm not sure why, but please investigate if you have time.
I have looked at it and do not know. But probably it is because I somehow have not caught how this new video code works...
Anyway, I sent documentation update how to run u-boot for n900 in qemu:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Quoted 8 lines
Quoted 2 lines
So it could help other people to look at issues which do not work correctly in n900's u-boot without need to have n900 hardware.
I've tested your v2 patches, and logo drawing works, but the logo appears for short time. Then it is later overwritten by boot menu.
--
Anatolij
Hello! Thank you for checking. It is possible that qemu rending is slower and reason why I did not see any logo.
Anyway, this is now how CONFIG_VIDEO_LOGO worked. In previous U-Boot version it drew logo on the screen and it was visible also in the boot menu.
Any idea what was changed? Or is there missing some another config option to make logo visible?
Re: [PATCH v2 1/2] video: Allow drivers to allocate the frame buffer themselves
In reply to Pali RohárQuoted 8 lines · Pali Rohár
When
plat->baseis set by driver then skip frame buffer reservation and allocation.Signed-off-by Pali Rohár <[email protected]>--- drivers/video/video-uclass.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Hi Pali,
Quoted 66 lines · Pali Rohár
Quoted 52 lines · On Wednesday 09 March 2022 23:20:11 Anatolij Gustschin wrote:
Hi Pali,
Quoted 47 lines · On Wed, 9 Mar 2022 20:44:50 +0100 Pali Rohár [email protected] wrote:
Quoted 20 lines · On Sunday 06 March 2022 11:44:22 Simon Glass wrote:
Hi Pali,
Quoted 17 lines · Pali Rohár
Quoted 1 line · On Sunday 06 March 2022 07:42:03 Simon Glass wrote:
Yes let's go with that.
Done, I sent final version of the patch.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Second thing is that
CONFIG_VIDEO_LOGOis broken and does not work even it is enabled in config file. I do not know why too.Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
Can you be more specific than 'broken'? What is broken about it?
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Does not work, logo is not drown on the screen.
See
video_bmp_display()- I wonder if the particular depth you are using is not supported?Depth is 16bit which should be supported.
But apparently isn't , at least in this case :-)
Yea, something is broken there.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Anyway you should be able to debug it there or
using the bmp command. The file isdrivers/video/u_boot_logo.bmp
CONFIG_CMD_BMP=yis broken too. When I enable it then U-Boot freeze after the line 'Loading Environment from <NULL>... OK'.OK I'm not sure why, but please investigate if you have time.
I have looked at it and do not know. But probably it is because I somehow have not caught how this new video code works...
Anyway, I sent documentation update how to run u-boot for n900 in qemu:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/Quoted 8 lines
Quoted 2 lines
So it could help other people to look at issues which do not work correctly in n900's u-boot without need to have n900 hardware.
I've tested your v2 patches, and logo drawing works, but the logo appears for short time. Then it is later overwritten by boot menu.
--
AnatolijHello! Thank you for checking. It is possible that qemu rending is slower and reason why I did not see any logo.
Quoted 6 lines
Anyway, this is now how
CONFIG_VIDEO_LOGOworked. In previous U-Boot version it drew logo on the screen and it was visible also in the boot menu.Any idea what was changed? Or is there missing some another config option to make logo visible?
I believe the cfb_console code had a way to keep the logo at the top with the text scrolling underneath. This has not been implemented in the video/vidconsole uclasses, although I suppose it could be.
Regards,
Simon
Quoted 76 lines · On Friday 11 March 2022 22:02:39 Simon Glass wrote:
Hi Pali,
Quoted 66 lines · Pali Rohár
Quoted 52 lines · On Wednesday 09 March 2022 23:20:11 Anatolij Gustschin wrote:
Hi Pali,
Quoted 47 lines · On Wed, 9 Mar 2022 20:44:50 +0100 Pali Rohár [email protected] wrote:
Quoted 20 lines · On Sunday 06 March 2022 11:44:22 Simon Glass wrote:
Hi Pali,
Quoted 17 lines · Pali Rohár
Quoted 1 line · On Sunday 06 March 2022 07:42:03 Simon Glass wrote:
Yes let's go with that.
Done, I sent final version of the patch.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Second thing is that CONFIG_VIDEO_LOGO is broken and does not work even it
is enabled in config file. I do not know why too.Any idea?
Not yet. There were some logo related changes recently, but if I remember correctly, I tested them on wandboard and nitrogen6q targets and with sandbox, and logo drawing worked there.
Can you be more specific than 'broken'? What is broken about it?
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Does not work, logo is not drown on the screen.
See
video_bmp_display()- I wonder if the particular depth you are using is not supported?Depth is 16bit which should be supported.
But apparently isn't , at least in this case :-)
Yea, something is broken there.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Anyway you should be able to debug it there or
using the bmp command. The file isdrivers/video/u_boot_logo.bmp
CONFIG_CMD_BMP=yis broken too. When I enable it then U-Boot freeze after the line 'Loading Environment from <NULL>... OK'.OK I'm not sure why, but please investigate if you have time.
I have looked at it and do not know. But probably it is because I somehow have not caught how this new video code works...
Anyway, I sent documentation update how to run u-boot for n900 in qemu:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/Quoted 8 lines
Quoted 2 lines
So it could help other people to look at issues which do not work correctly in n900's u-boot without need to have n900 hardware.
I've tested your v2 patches, and logo drawing works, but the logo appears for short time. Then it is later overwritten by boot menu.
--
AnatolijHello! Thank you for checking. It is possible that qemu rending is slower and reason why I did not see any logo.
Quoted 6 lines
Anyway, this is now how
CONFIG_VIDEO_LOGOworked. In previous U-Boot version it drew logo on the screen and it was visible also in the boot menu.Any idea what was changed? Or is there missing some another config option to make logo visible?
Quoted 6 lines
I believe the
cfb_consolecode had a way to keep the logo at the top with the text scrolling underneath. This has not been implemented in the video/vidconsole uclasses, although I suppose it could be.Regards,
Simon
Ok!
Re: [PATCH v2 1/2] video: Allow drivers to allocate the frame buffer themselves
In reply to Pali RohárQuoted 6 lines · On Wed, 9 Mar 2022 20:46:00 +0100 Pali Rohár [email protected] wrote:
When
plat->baseis set by driver then skip frame buffer reservation and allocation.Signed-off-by Pali Rohár <[email protected]>--- drivers/video/video-uclass.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
applied to u-boot-video/master, thanks!
--
Anatolij
Re: [PATCH v2 2/2] Nokia RX-51: Convert to CONFIG_DM_VIDEO
In reply to Pali RohárOn Wed, 9 Mar 2022 20:46:01 +0100
Pali Rohár [email protected] wrote:
...
Quoted 5 lines
--- board/nokia/rx51/rx51.c | 40 +++++++++++++++++++++--------------- configs/nokia_rx51_defconfig | 7 +++++-- include/configs/nokia_rx51.h | 11 ++-------- 3 files changed, 31 insertions(+), 27 deletions(-)
applied to u-boot-video/master, thanks!
--
Anatolij