]> Git Repo - u-boot.git/blobdiff - drivers/video/imx/mxc_ipuv3_fb.c
mxc_ipuv3_fb.c: call display_enable
[u-boot.git] / drivers / video / imx / mxc_ipuv3_fb.c
index 3e38d4bdcc35a427f31353142d302ee17063b051..aca76bd9ccf2cc11ca9020a73882db72c3993eb2 100644 (file)
@@ -24,6 +24,7 @@
 #include "ipu.h"
 #include "mxcfb.h"
 #include "ipu_regs.h"
+#include "display.h"
 
 #include <dm.h>
 #include <video.h>
@@ -609,6 +610,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;
 }
@@ -636,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;
 
@@ -654,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;
@@ -665,6 +679,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;
 }
@@ -678,13 +693,14 @@ static int ipuv3_video_bind(struct udevice *dev)
        struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
 
        plat->size = LCD_MAX_WIDTH * LCD_MAX_HEIGHT *
-                    (1 << LCD_MAX_LOG2_BPP) / 8;
+                    (1 << VIDEO_BPP32) / 8;
 
        return 0;
 }
 
 static const struct udevice_id ipuv3_video_ids[] = {
        { .compatible = "fsl,imx6q-ipu" },
+       { .compatible = "fsl,imx53-ipu" },
        { }
 };
 
This page took 0.028101 seconds and 4 git commands to generate.