video: Armada XP: Move driver to DM_VIDEO
Subsystems (4)
PATCH 1/1 video: Armada XP: Move driver to DM_VIDEO
This patch moves the Armada XP video / LCD driver to DM_VIDEO. With this move, the legacy interface board_video_init() is removed from the theadorable board code (only user of this video driver). The support via DT will be added in a separate patch.
--- arch/arm/mach-mvebu/include/mach/cpu.h | 12 - board/theadorable/theadorable.c | 16 -- drivers/video/mvebu_lcd.c | 321 +++++++++++++++---------- 3 files changed, 192 insertions(+), 157 deletions(-)
arch/arm/mach-mvebu/include/mach/cpu.h +0 -12
@@ -158,18 +158,6 @@ int serdes_phy_config(void);*/ int ddr3_init (void ); -struct mvebu_lcd_info { -u32 fb_base; -int x_res; -int y_res; -int x_fp;/* frontporch */ -int y_fp; -int x_bp;/* backporch */ -int y_bp; -}; - -int mvebu_lcd_register_init (struct mvebu_lcd_info *lcd_info); -/* * get_ref_clk *
board/theadorable/theadorable.c +0 -16
@@ -222,22 +222,6 @@ int board_eth_init(bd_t *bis) }#endif -int board_video_init (void ) -{ -struct mvebu_lcd_info lcd_info; - -/* Reserved memory area via CONFIG_SYS_MEM_TOP_HIDE */ - lcd_info.fb_base = gd->ram_size; - lcd_info.x_res =240 ; - lcd_info.x_fp =1 ; - lcd_info.x_bp =45 ; - lcd_info.y_res =320 ; - lcd_info.y_fp =1 ; - lcd_info.y_bp =3 ; - -return mvebu_lcd_register_init (&lcd_info); -} -#ifdef CONFIG_BOARD_LATE_INIT int board_late_init (void ) {
drivers/video/mvebu_lcd.c +192 -129
565 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 1/1 video: bmp: Add support for 24bpp BMP files on 16bpp displays
This patch adds support to load 24bpp BMP files on 16bpp displays. This will be used by the theadorable board. The "old" bmp command did support this operartion mode and to not break compatibility with the move to DM_VIDEO, we need to add this support to the "new" bmp code.
--- drivers/video/video_bmp.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
drivers/video/video_bmp.c +17 -6
@@ -229,11 +229,12 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, }/* -* We support displaying 8bpp BMPs on 16bpp LCDs +* We support displaying 8bpp and 24bpp BMPs on 16bpp LCDs * and displaying 24bpp BMPs on 32bpp LCDs -* */ +*/ if (bpix != bmp_bpix && !(bmp_bpix ==8 && bpix ==16 ) && + !(bmp_bpix ==24 && bpix ==16 ) && !(bmp_bpix ==24 && bpix ==32 )) {printf ("Error: %d bit/pixel mode, but BMP has %d bit/pixel\n" , bpix,get_unaligned_le16 (&bmp->header.bit_count));
@@ -318,12 +319,22 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,case 24 :for (i =0 ; i < height; ++i) {for (j =0 ; j < width; j++) { - *(fb++) = *(bmap++); - *(fb++) = *(bmap++); - *(fb++) = *(bmap++); - *(fb++) =0 ; +if (bpix ==16 ) { +/* 16bit 555RGB format */ + *(u16 *)fb = ((bmap[2 ] >>3 ) <<10 ) | + ((bmap[1 ] >>3 ) <<5 ) | + (bmap[0 ] >>3 ); + bmap +=3 ; + fb +=2 ; + }else { + *(fb++) = *(bmap++); + *(fb++) = *(bmap++); + *(fb++) = *(bmap++); + *(fb++) =0 ; + } } fb -= priv->line_length + width * (bpix /8 ); + bmap += (padded_width - width) *3 ; }break ;#endif /* CONFIG_BMP_24BPP */
Signature · 1 line
2.20.1
PATCH 1/1 video: bmp: Add support for 24bpp BMP files on 16bpp displays
Quoted 7 lines · On Tue, 29 Jan 2019 11:44:44 +0100 Stefan Roese sr at denx.de wrote:
This patch adds support to load 24bpp BMP files on 16bpp displays. This will be used by the theadorable board. The "old" bmp command did support this operartion mode and to not break compatibility with the move to
DM_VIDEO, we need to add this support to the "new" bmp code.Signed-off-by Stefan Roese <[email protected]>Cc Anatolij Gustschin <[email protected]>
--
Anatolij
PATCH 1/1 arm: mvebu: theadorable: Enable DM_VIDEO support
In reply to Stefan RoeseWith the recently added DM_VIDEO support added to the Armada XP video / LCD driver, this patch now switches the theadorable board to use this DM_VIDEO.
Additionally the now needed DT node for the LCD controller is added to the theadorable dts file. This DT property is not added to the Armada XP dtsi files, as this LCD feature is pretty unusual for this SoC and I personally know of no other board that uses this controller.
This patch also enables CONFIG_BMP_16BPP/24BPP/32BPP, as the "old" bmp command supported these BMP files.
--- arch/arm/dts/armada-xp-theadorable.dts | 25 +++++++++++++++++++++++++ configs/theadorable_debug_defconfig | 3 +-- include/configs/theadorable.h | 4 ++++ 3 files changed, 30 insertions(+), 2 deletions(-)
arch/arm/dts/armada-xp-theadorable.dts +25 -0
@@ -159,6 +159,31 @@ spi-max-frequency = <27777777>; }; }; + + /* The LCD controller is only used on this board */ + lcd0: lcd-controller at e0000 { + compatible = "marvell,armada-xp-lcd"; + reg = <0xe0000 0x10000>; + status = "okay"; + u-boot,dm-pre-reloc; + + display-timings { + native-mode = <&timing0>; + timing0: panel0 { + hactive = <240>; + vactive = <320>; + hfront-porch = <1>; + hback-porch = <45>; + vfront-porch = <1>; + vback-porch = <3>; + + /* Some dummy parameters */ + clock-frequency = <0>; + hsync-len = <0>; + vsync-len = <0>; + }; + }; + }; }; }; };
configs/theadorable_debug_defconfig +1 -2
@@ -71,6 +71,5 @@ CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_DM_VIDEO=y CONFIG_VIDEO_MVEBU=y -CONFIG_VIDEO=y -# CONFIG_VIDEO_SW_CURSOR is not set
include/configs/theadorable.h +4 -0
@@ -65,6 +65,10 @@/* Enable LCD and reserve 512KB from top of memory*/ #define CONFIG_SYS_MEM_TOP_HIDE 0x80000 +#define CONFIG_BMP_16BPP +#define CONFIG_BMP_24BPP +#define CONFIG_BMP_32BPP +/* FPGA programming support */ #define CONFIG_FPGA_STRATIX_V
Signature · 1 line
2.20.1
PATCH 1/1 arm: mvebu: theadorable: Enable DM_VIDEO support
Quoted 9 lines · On Tue, 29 Jan 2019 11:44:45 +0100 Stefan Roese sr at denx.de wrote:
With the recently added
DM_VIDEOsupport added to the Armada XP video / LCD driver, this patch now switches the theadorable board to use thisDM_VIDEO.Additionally the now needed DT node for the LCD controller is added to the theadorable dts file. This DT property is not added to the Armada XP dtsi files, as this LCD feature is pretty unusual for this SoC and I personally know of no other board that uses this controller.
Quoted 5 lines
This patch also enables CONFIG_BMP_16BPP/24BPP/32BPP, as the "old" bmp command supported these BMP files.
Signed-off-by Stefan Roese <[email protected]>Cc Anatolij Gustschin <[email protected]>
--
Anatolij
PATCH 1/1 video: Armada XP: Move driver to DM_VIDEO
In reply to Stefan RoeseHi Stefan,
Quoted 7 lines · On Tue, 29 Jan 2019 11:44:43 +0100 Stefan Roese sr at denx.de wrote:
This patch moves the Armada XP video / LCD driver to
DM_VIDEO. With this move, the legacy interfaceboard_video_init()is removed from the theadorable board code (only user of this video driver). The support via DT will be added in a separate patch.Signed-off-by Stefan Roese <[email protected]>Cc Anatolij Gustschin <[email protected]>
--
Anatolij
PATCH 1/1 video: Armada XP: Move driver to DM_VIDEO
Hi Anatolij,
Quoted 10 lines · Anatolij Gustschin
Hi Stefan,
Quoted 5 lines · On Tue, 29 Jan 2019 11:44:43 +0100 Stefan Roese sr at denx.de wrote:
This patch moves the Armada XP video / LCD driver to
DM_VIDEO. With this move, the legacy interfaceboard_video_init()is removed from the theadorable board code (only user of this video driver). The support via DT will be added in a separate patch.
Quoted 4 lines
Quoted 2 lines
Signed-off-by Stefan Roese <[email protected]>Cc Anatolij Gustschin <[email protected]>Reviewed-by Anatolij Gustschin <[email protected]>
Thanks. I just noticed that this patch applied without the theadorable move to DM_VIDEO will cause compilation errors. Perhaps its better to squash both patches so not break git bisect'ability. What do you think?
Thanks,
Stefan
PATCH 1/1 video: Armada XP: Move driver to DM_VIDEO
Hi Stefan,
On Wed, 30 Jan 2019 07:32:20 +0100
Stefan Roese sr at denx.de wrote:
...
Quoted 4 lines
Thanks. I just noticed that this patch applied without the theadorable move to
DM_VIDEOwill cause compilation errors. Perhaps its better to squash both patches so not break git bisect'ability. What do you think?
Does it build when you add theadorable_debug_defconfig updates from third patch to this patch? If so, then I suggest to do so.
Thanks,
--
Anatolij
PATCH 1/1 video: Armada XP: Move driver to DM_VIDEO
Hi Anatolij,
Quoted 10 lines · Anatolij Gustschin
On Wed, 30 Jan 2019 07:32:20 +0100
Stefan Roese sr at denx.de wrote:
...Quoted 4 lines
Thanks. I just noticed that this patch applied without the theadorable move to
DM_VIDEOwill cause compilation errors. Perhaps its better to squash both patches so not break git bisect'ability. What do you think?Does it build when you add
theadorable_debug_defconfigupdates from third patch to this patch? If so, then I suggest to do so.
Yes, this should work as well. I'll send v2 shortly.
Will you pull the video driver patch, or should I pull it via the Marvell tree with the other updates?
Thanks,
Stefan
PATCH 1/1 video: Armada XP: Move driver to DM_VIDEO
Hi Stefan,
On Wed, 30 Jan 2019 08:39:52 +0100
Stefan Roese sr at denx.de wrote:
...
Quoted 4 lines
Yes, this should work as well. I'll send v2 shortly.
Will you pull the video driver patch, or should I pull it via the Marvell tree with the other updates?
Do you run Travis-CI build tests for Marvell tree? If yes, then it is okay if it goes via Marvell tree.
Thanks,
--
Anatolij
PATCH 1/1 video: Armada XP: Move driver to DM_VIDEO
Hi Anatolij,
Quoted 5 lines · Anatolij Gustschin
Hi Stefan,
On Wed, 30 Jan 2019 08:39:52 +0100
Stefan Roese sr at denx.de wrote:
...
Quoted 7 lines
Quoted 4 lines
Yes, this should work as well. I'll send v2 shortly.
Will you pull the video driver patch, or should I pull it via the Marvell tree with the other updates?
Do you run Travis-CI build tests for Marvell tree? If yes, then it is okay if it goes via Marvell tree.
Yes, I always run this test before sending the pull request the Tom (even though it takes like half a day to complete).
Could you please send your Acked-by tag as well to the new video patches (will come in a few minutes). This makes it more clear that you are "okay" with me pulling them.
Thanks,
Stefan
PATCH 1/1 video: Armada XP: Move driver to DM_VIDEO
Hi Stefan,
On Wed, 30 Jan 2019 08:49:38 +0100
Stefan Roese sr at denx.de wrote:
...
Quoted 3 lines
Could you please send your Acked-by tag as well to the new video patches (will come in a few minutes). This makes it more clear that you are "okay" with me pulling them.
Done.
--
Anatolij