Skip to contentSkip to conversation

imx-ipu-fb: Add board specific hook to enable display

PATCH New Eric Bénard 1 participant 2 messages Jun 24, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 imx-ipu-fb: Add board specific hook to enable display

---
 arch/arm/mach-imx/include/mach/imx-ipu-fb.h |    2 ++
 drivers/video/imx-ipu-fb.c                  |    8 ++++++++
 2 files changed, 10 insertions(+), 0 deletions(-)
arch/arm/mach-imx/include/mach/imx-ipu-fb.h +2 -0
index 53c6d26..dd65b04 100644
@@ -28,6 +28,8 @@ struct imx_ipu_fb_platform_data {
 	const struct fb_videomode	*mode;
 	unsigned char		bpp;
 	void __iomem		*framebuffer;
+	/** hook to enable backlight and stuff */
+	void			(*enable)(int enable);
 };
 
 #endif /* __MACH_IMX_IPU_FB_H__ */
drivers/video/imx-ipu-fb.c +8 -0
index 6d1eb5e..8994da4 100644
@@ -36,6 +36,8 @@
 struct ipu_fb_info {
 	void __iomem		*regs;
 
+	void			(*enable)(int enable);
+
 	struct fb_info		info;
 	struct device_d		*dev;
 };
@@ -828,6 +830,8 @@ static void ipu_fb_enable(struct fb_info *info)
 	 * Linux driver calls sdc_set_brightness() here again,
 	 * once is enough for us
 	 */
+	if (fbi->enable)
+		fbi->enable(1);
 }
 
 static void ipu_fb_disable(struct fb_info *info)
@@ -835,6 +839,9 @@ static void ipu_fb_disable(struct fb_info *info)
 	struct ipu_fb_info *fbi = info->priv;
 	u32 reg;
 
+	if (fbi->enable)
+		fbi->enable(0);
+
 	reg = reg_read(fbi, SDC_COM_CONF);
 	reg &= ~SDC_COM_BG_EN;
 	reg_write(fbi, reg, SDC_COM_CONF);
@@ -866,6 +873,7 @@ static int imxfb_probe(struct device_d *dev)
 	info->yres = pdata->mode->yres;
 	info->bits_per_pixel = pdata->bpp;
 	info->fbops = &imxfb_ops;
+	fbi->enable = pdata->enable;
 
 	dev_info(dev, "i.MX Framebuffer driver\n");
 
Signature · 7 lines
1.6.3.3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 2/2 imx-ipu-fb: do not enable framebuffer on startup

The board code or startup script should enable it when it actually wants to.

---
 drivers/video/imx-ipu-fb.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/video/imx-ipu-fb.c +0 -2
index 8994da4..45f2215 100644
@@ -895,8 +895,6 @@ static int imxfb_probe(struct device_d *dev)
 		return ret;
 	}
 
-	ipu_fb_enable(info);
-
 	return 0;
 }
 
Signature · 7 lines
1.6.3.3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox