public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support
@ 2019-07-22  4:49 Heiko Schocher
  2019-07-22  4:49 ` [U-Boot] [PATCH v1 1/5] global_data: enable fb_base for DM_VIDEO Heiko Schocher
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Heiko Schocher @ 2019-07-22  4:49 UTC (permalink / raw)
  To: u-boot

some small enhancements for display support for the
DM conversion of the aristainetos port.

Travis build:
https://travis-ci.org/hsdenx/u-boot-test/builds/559790510


Heiko Schocher (5):
  global_data: enable fb_base for DM_VIDEO
  mxc_ipuv3_fb.c: set gd->fb_base
  bdinfo: show fb base with DM_VIDEO
  mxc_ipuv3_fb.c: call display_enable
  mxc_ipuv3_fb.c: enable a backlight on a panel

 cmd/bdinfo.c                      |  2 +-
 drivers/video/imx/mxc_ipuv3_fb.c  | 20 ++++++++++++++++++++
 include/asm-generic/global_data.h |  2 +-
 3 files changed, 22 insertions(+), 2 deletions(-)

-- 
2.21.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v1 1/5] global_data: enable fb_base for DM_VIDEO
  2019-07-22  4:49 [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support Heiko Schocher
@ 2019-07-22  4:49 ` Heiko Schocher
  2019-07-22  4:49 ` [U-Boot] [PATCH v1 2/5] mxc_ipuv3_fb.c: set gd->fb_base Heiko Schocher
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Heiko Schocher @ 2019-07-22  4:49 UTC (permalink / raw)
  To: u-boot

with CONFIG_VIDEO we store fb base address
in global data fb_base variable. Do this
also in DM_VIDEO case.

Signed-off-by: Heiko Schocher <hs@denx.de>

---

 include/asm-generic/global_data.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 02a3ed6838..11bbe9b134 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -33,7 +33,7 @@ typedef struct global_data {
 	/* We cannot bracket this with CONFIG_PCI due to mpc5xxx */
 	unsigned long pci_clk;
 	unsigned long mem_clk;
-#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO)
+#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO) || defined(CONFIG_DM_VIDEO)
 	unsigned long fb_base;		/* Base address of framebuffer mem */
 #endif
 #if defined(CONFIG_POST)
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v1 2/5] mxc_ipuv3_fb.c: set gd->fb_base
  2019-07-22  4:49 [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support Heiko Schocher
  2019-07-22  4:49 ` [U-Boot] [PATCH v1 1/5] global_data: enable fb_base for DM_VIDEO Heiko Schocher
@ 2019-07-22  4:49 ` Heiko Schocher
  2019-07-22  4:49 ` [U-Boot] [PATCH v1 3/5] bdinfo: show fb base with DM_VIDEO Heiko Schocher
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Heiko Schocher @ 2019-07-22  4:49 UTC (permalink / raw)
  To: u-boot

set gd->fb_base so it can be shown with bdinfo command.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 drivers/video/imx/mxc_ipuv3_fb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c
index 29ecac40a2..cf672156cd 100644
--- a/drivers/video/imx/mxc_ipuv3_fb.c
+++ b/drivers/video/imx/mxc_ipuv3_fb.c
@@ -609,6 +609,7 @@ void *video_hw_init(void)
 
 	ret = mxcfb_probe(gpixfmt, gdisp, gmode);
 	debug("Framebuffer at 0x%x\n", (unsigned int)panel.frameAdrs);
+	gd->fb_base = panel.frameAdrs;
 
 	return (void *)&panel;
 }
@@ -665,6 +666,7 @@ static int ipuv3_video_probe(struct udevice *dev)
 	mmu_set_region_dcache_behaviour(fb_start, fb_end - fb_start,
 					DCACHE_WRITEBACK);
 	video_set_flush_dcache(dev, true);
+	gd->fb_base = fb_start;
 
 	return 0;
 }
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v1 3/5] bdinfo: show fb base with DM_VIDEO
  2019-07-22  4:49 [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support Heiko Schocher
  2019-07-22  4:49 ` [U-Boot] [PATCH v1 1/5] global_data: enable fb_base for DM_VIDEO Heiko Schocher
  2019-07-22  4:49 ` [U-Boot] [PATCH v1 2/5] mxc_ipuv3_fb.c: set gd->fb_base Heiko Schocher
@ 2019-07-22  4:49 ` Heiko Schocher
  2019-07-22  4:49 ` [U-Boot] [PATCH v1 4/5] mxc_ipuv3_fb.c: call display_enable Heiko Schocher
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Heiko Schocher @ 2019-07-22  4:49 UTC (permalink / raw)
  To: u-boot

show Framebuffer base with CONFIG_DM_VIDEO
enabled.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 cmd/bdinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index f576e226ee..86c17dc427 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -328,7 +328,7 @@ static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
 	print_num("reloc off", gd->reloc_off);
 	print_num("irq_sp", gd->irq_sp);	/* irq stack pointer */
 	print_num("sp start ", gd->start_addr_sp);
-#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO)
+#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO) || defined(CONFIG_DM_VIDEO)
 	print_num("FB base  ", gd->fb_base);
 #endif
 	/*
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v1 4/5] mxc_ipuv3_fb.c: call display_enable
  2019-07-22  4:49 [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support Heiko Schocher
                   ` (2 preceding siblings ...)
  2019-07-22  4:49 ` [U-Boot] [PATCH v1 3/5] bdinfo: show fb base with DM_VIDEO Heiko Schocher
@ 2019-07-22  4:49 ` Heiko Schocher
  2019-07-22  4:49 ` [U-Boot] [PATCH v1 5/5] mxc_ipuv3_fb.c: enable a backlight on a panel Heiko Schocher
  2019-07-30 12:53 ` [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support Anatolij Gustschin
  5 siblings, 0 replies; 7+ messages in thread
From: Heiko Schocher @ 2019-07-22  4:49 UTC (permalink / raw)
  To: u-boot

call display_enable, so a display gets enabled.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 drivers/video/imx/mxc_ipuv3_fb.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c
index cf672156cd..aca76bd9cc 100644
--- a/drivers/video/imx/mxc_ipuv3_fb.c
+++ b/drivers/video/imx/mxc_ipuv3_fb.c
@@ -24,6 +24,7 @@
 #include "ipu.h"
 #include "mxcfb.h"
 #include "ipu_regs.h"
+#include "display.h"
 
 #include <dm.h>
 #include <video.h>
@@ -637,6 +638,9 @@ static int ipuv3_video_probe(struct udevice *dev)
 {
 	struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
 	struct video_priv *uc_priv = dev_get_uclass_priv(dev);
+#if defined(CONFIG_DISPLAY)
+	struct udevice *disp_dev;
+#endif
 	u32 fb_start, fb_end;
 	int ret;
 
@@ -655,6 +659,15 @@ static int ipuv3_video_probe(struct udevice *dev)
 	if (ret < 0)
 		return ret;
 
+#if defined(CONFIG_DISPLAY)
+	ret = uclass_first_device(UCLASS_DISPLAY, &disp_dev);
+	if (disp_dev) {
+		ret = display_enable(disp_dev, 16, NULL);
+		if (ret < 0)
+			return ret;
+	}
+#endif
+
 	uc_priv->xsize = gmode->xres;
 	uc_priv->ysize = gmode->yres;
 	uc_priv->bpix = LCD_MAX_LOG2_BPP;
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v1 5/5] mxc_ipuv3_fb.c: enable a backlight on a panel
  2019-07-22  4:49 [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support Heiko Schocher
                   ` (3 preceding siblings ...)
  2019-07-22  4:49 ` [U-Boot] [PATCH v1 4/5] mxc_ipuv3_fb.c: call display_enable Heiko Schocher
@ 2019-07-22  4:49 ` Heiko Schocher
  2019-07-30 12:53 ` [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support Anatolij Gustschin
  5 siblings, 0 replies; 7+ messages in thread
From: Heiko Schocher @ 2019-07-22  4:49 UTC (permalink / raw)
  To: u-boot

check if we get a panel device, if so, enable
the backlight on it.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 drivers/video/imx/mxc_ipuv3_fb.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c
index aca76bd9cc..c64be38e49 100644
--- a/drivers/video/imx/mxc_ipuv3_fb.c
+++ b/drivers/video/imx/mxc_ipuv3_fb.c
@@ -25,6 +25,7 @@
 #include "mxcfb.h"
 #include "ipu_regs.h"
 #include "display.h"
+#include <panel.h>
 
 #include <dm.h>
 #include <video.h>
@@ -641,6 +642,7 @@ static int ipuv3_video_probe(struct udevice *dev)
 #if defined(CONFIG_DISPLAY)
 	struct udevice *disp_dev;
 #endif
+	struct udevice *panel_dev;
 	u32 fb_start, fb_end;
 	int ret;
 
@@ -667,6 +669,9 @@ static int ipuv3_video_probe(struct udevice *dev)
 			return ret;
 	}
 #endif
+	ret = uclass_get_device(UCLASS_PANEL, 0, &panel_dev);
+	if (panel_dev)
+		panel_enable_backlight(panel_dev);
 
 	uc_priv->xsize = gmode->xres;
 	uc_priv->ysize = gmode->yres;
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support
  2019-07-22  4:49 [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support Heiko Schocher
                   ` (4 preceding siblings ...)
  2019-07-22  4:49 ` [U-Boot] [PATCH v1 5/5] mxc_ipuv3_fb.c: enable a backlight on a panel Heiko Schocher
@ 2019-07-30 12:53 ` Anatolij Gustschin
  5 siblings, 0 replies; 7+ messages in thread
From: Anatolij Gustschin @ 2019-07-30 12:53 UTC (permalink / raw)
  To: u-boot

Hi Heiko,

On Mon, 22 Jul 2019 06:49:03 +0200
Heiko Schocher hs at denx.de wrote:
... 
> Heiko Schocher (5):
>   global_data: enable fb_base for DM_VIDEO
>   mxc_ipuv3_fb.c: set gd->fb_base
>   bdinfo: show fb base with DM_VIDEO
>   mxc_ipuv3_fb.c: call display_enable
>   mxc_ipuv3_fb.c: enable a backlight on a panel
> 
>  cmd/bdinfo.c                      |  2 +-
>  drivers/video/imx/mxc_ipuv3_fb.c  | 20 ++++++++++++++++++++
>  include/asm-generic/global_data.h |  2 +-
>  3 files changed, 22 insertions(+), 2 deletions(-)

Series applied to u-boot-video/master, thanks!

--
Anatolij

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-07-30 12:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-22  4:49 [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support Heiko Schocher
2019-07-22  4:49 ` [U-Boot] [PATCH v1 1/5] global_data: enable fb_base for DM_VIDEO Heiko Schocher
2019-07-22  4:49 ` [U-Boot] [PATCH v1 2/5] mxc_ipuv3_fb.c: set gd->fb_base Heiko Schocher
2019-07-22  4:49 ` [U-Boot] [PATCH v1 3/5] bdinfo: show fb base with DM_VIDEO Heiko Schocher
2019-07-22  4:49 ` [U-Boot] [PATCH v1 4/5] mxc_ipuv3_fb.c: call display_enable Heiko Schocher
2019-07-22  4:49 ` [U-Boot] [PATCH v1 5/5] mxc_ipuv3_fb.c: enable a backlight on a panel Heiko Schocher
2019-07-30 12:53 ` [U-Boot] [PATCH v1 0/5] imx6, display: enhancements for upcoming aristainetos DM support Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox