From f3410474826898f7cba5d986f99819ab11f3a7d9 Mon Sep 17 00:00:00 2001
From: Torben Hohn <torbenh@linutronix.de>
Date: Mon, 27 May 2013 20:10:09 +0200
Subject: [PATCH 25/51] da8xx-fb: Add support to configure bpp via devicetree

---
 drivers/video/da8xx-fb.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Index: linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c
===================================================================
@ linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c:1318 @ static struct fb_ops da8xx_fb_ops = {
 static struct lcd_ctrl_config *da8xx_fb_create_cfg(struct platform_device *dev)
 {
 	struct lcd_ctrl_config *cfg;
+	struct device_node *np = dev->dev.of_node;
 
 	cfg = devm_kzalloc(&dev->dev, sizeof(struct fb_videomode), GFP_KERNEL);
 	if (!cfg) {
@ linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c:1330 @ static struct lcd_ctrl_config *da8xx_fb_
 
 	if (lcd_revision == LCD_VERSION_1)
 		cfg->bpp = 16;
-	else
-		cfg->bpp = 16;
+	else {
+		u32 val;
+		if (!of_property_read_u32(np, "bpp", &val))
+			cfg->bpp = val;
+		else
+			cfg->bpp = 16;
+	}
 
 	/*
 	 * For panels so far used with this LCDC, below statement is sufficient.
@ linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c:1346 @ static struct lcd_ctrl_config *da8xx_fb_
 	 */
 
 	cfg->panel_shade = COLOR_ACTIVE;
+	cfg->dma_burst_sz = 16;
+	cfg->fifo_th = 6;
+
 
 	return cfg;
 }