From f03e56adada60a1b8ddcd4eca324878efbc540cb Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 22 Jul 2019 06:49:05 +0200 Subject: mxc_ipuv3_fb.c: set gd->fb_base set gd->fb_base so it can be shown with bdinfo command. Signed-off-by: Heiko Schocher --- drivers/video/imx/mxc_ipuv3_fb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/video/imx/mxc_ipuv3_fb.c') 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; } -- cgit From f4ec1ae08ea9a4ed51ea0bf0583c416be7ec7eb8 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 22 Jul 2019 06:49:07 +0200 Subject: mxc_ipuv3_fb.c: call display_enable call display_enable, so a display gets enabled. Signed-off-by: Heiko Schocher --- drivers/video/imx/mxc_ipuv3_fb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'drivers/video/imx/mxc_ipuv3_fb.c') 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 #include @@ -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; -- cgit From 42a7ce27d97022f4abbba142dfa00d1450512f0a Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 22 Jul 2019 06:49:08 +0200 Subject: mxc_ipuv3_fb.c: enable a backlight on a panel check if we get a panel device, if so, enable the backlight on it. Signed-off-by: Heiko Schocher --- drivers/video/imx/mxc_ipuv3_fb.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/video/imx/mxc_ipuv3_fb.c') 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 #include #include @@ -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; -- cgit