r4267 - branches/src/target/kernel/2.6.24.x/patches

werner at sita.openmoko.org werner at sita.openmoko.org
Fri Mar 28 19:22:41 CET 2008


Author: werner
Date: 2008-03-28 19:22:38 +0100 (Fri, 28 Mar 2008)
New Revision: 4267

Added:
   branches/src/target/kernel/2.6.24.x/patches/glamo-cmdqueue-bandaid.patch
Modified:
   branches/src/target/kernel/2.6.24.x/patches/series
Log:
Andy's debug-glamo-fb-cmdqueue-wait-timeout.patch



Added: branches/src/target/kernel/2.6.24.x/patches/glamo-cmdqueue-bandaid.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/glamo-cmdqueue-bandaid.patch	2008-03-28 16:38:40 UTC (rev 4266)
+++ branches/src/target/kernel/2.6.24.x/patches/glamo-cmdqueue-bandaid.patch	2008-03-28 18:22:38 UTC (rev 4267)
@@ -0,0 +1,76 @@
+[ Stop kernel from hanging every once in a while during Glamo
+  initialization. ]
+
+debug-glamo-fb-cmdqueue-wait-timeout.patch
+
+From: warmcat <andy at warmcat.com>
+
+---
+
+ drivers/mfd/glamo/glamo-fb.c |   30 +++++++++++++++++++++++++++---
+ 1 files changed, 27 insertions(+), 3 deletions(-)
+
+Index: linux-2.6.24/drivers/mfd/glamo/glamo-fb.c
+===================================================================
+--- linux-2.6.24.orig/drivers/mfd/glamo/glamo-fb.c
++++ linux-2.6.24/drivers/mfd/glamo/glamo-fb.c
+@@ -553,12 +553,20 @@
+ 
+ void glamofb_cmd_mode(struct glamofb_handle *gfb, int on)
+ {
++	int timeout = 2000;
++
+ 	dev_dbg(gfb->dev, "glamofb_cmd_mode(gfb=%p, on=%d)\n", gfb, on);
+ 	if (on) {
+ 		dev_dbg(gfb->dev, "%s: waiting for cmdq empty: ",
+ 			__FUNCTION__);
+-		while (!glamofb_cmdq_empty(gfb))
++		while ((!glamofb_cmdq_empty(gfb)) && (timeout--))
+ 			yield();
++		if (timeout < 0) {
++			printk(KERN_ERR"*************"
++				       "glamofb cmd_queue never got empty"
++				       "*************\n");
++			return;
++		}
+ 		dev_dbg(gfb->dev, "empty!\n");
+ 
+ 		/* display the entire frame then switch to command */
+@@ -568,8 +576,16 @@
+ 
+ 		/* wait until LCD is idle */
+ 		dev_dbg(gfb->dev, "waiting for LCD idle: ");
+-		while (!reg_read(gfb, GLAMO_REG_LCD_STATUS2) & (1 << 12))
++		timeout = 2000;
++		while ((!reg_read(gfb, GLAMO_REG_LCD_STATUS2) & (1 << 12)) &&
++		      (timeout--))
+ 			yield();
++		if (timeout < 0) {
++			printk(KERN_ERR"*************"
++				       "glamofb lcd never idle"
++				       "*************\n");
++			return;
++		}
+ 		dev_dbg(gfb->dev, "idle!\n");
+ 
+ 		msleep(90);
+@@ -589,10 +605,18 @@
+ 
+ int glamofb_cmd_write(struct glamofb_handle *gfb, u_int16_t val)
+ {
++	int timeout = 2000;
++
+ 	dev_dbg(gfb->dev, "%s: waiting for cmdq empty\n",
+ 		__FUNCTION__);
+-	while (!glamofb_cmdq_empty(gfb))
++	while ((!glamofb_cmdq_empty(gfb)) && (timeout--))
+ 		yield();
++	if (timeout < 0) {
++		printk(KERN_ERR"*************"
++				"glamofb cmd_queue never got empty"
++				"*************\n");
++		return 1;
++	}
+ 	dev_dbg(gfb->dev, "idle, writing 0x%04x\n", val);
+ 
+ 	reg_write(gfb, GLAMO_REG_LCD_COMMAND1, val);

Modified: branches/src/target/kernel/2.6.24.x/patches/series
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/series	2008-03-28 16:38:40 UTC (rev 4266)
+++ branches/src/target/kernel/2.6.24.x/patches/series	2008-03-28 18:22:38 UTC (rev 4267)
@@ -117,5 +117,6 @@
 # Preliminary suspend/resume power saving improvements
 suspend-prelim1.patch
 
-# temporary work-around
+# temporary work-arounds
 gta02-sound-bandaid.patch
+glamo-cmdqueue-bandaid.patch





More information about the commitlog mailing list