aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/glamo/glamo-fb.c
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:11:11 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:11:11 +0000
commit6e0df963162d04cb4243155a0137faa12516d9a2 (patch)
tree56f5e07f5f82ae22b4fe71ce37a2c7e52ddd5578 /drivers/mfd/glamo/glamo-fb.c
parent9d6e27160ddcd316d5b5fc9a2caf74d340e2ba93 (diff)
debug-resume-hang.patch
Weeks of frantic effort to control Glamo, traced the issue to two outcomes: nWAIT is forced down and the device is hard locked, or we survive immediate Glamo resume and die again with nWAIT forced down when the framebuffer driver tries to flash the soft cursor. Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/mfd/glamo/glamo-fb.c')
-rw-r--r--drivers/mfd/glamo/glamo-fb.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/mfd/glamo/glamo-fb.c b/drivers/mfd/glamo/glamo-fb.c
index 26a6d29ddba..7bfd539972f 100644
--- a/drivers/mfd/glamo/glamo-fb.c
+++ b/drivers/mfd/glamo/glamo-fb.c
@@ -945,8 +945,14 @@ static int glamofb_suspend(struct platform_device *pdev, pm_message_t state)
{
struct glamofb_handle *gfb = platform_get_drvdata(pdev);
- if (state.event & PM_EVENT_SLEEP)
- fb_set_suspend(gfb->fb, 1);
+ /* we need to stop anything touching our framebuffer */
+// fb_blank(gfb->fb, FB_BLANK_NORMAL);
+ fb_set_suspend(gfb->fb, 1);
+
+ /* seriously -- nobody is allowed to touch glamo memory when we
+ * are suspended or we lock on nWAIT
+ */
+// iounmap(gfb->fb->screen_base);
return 0;
}
@@ -955,7 +961,12 @@ static int glamofb_resume(struct platform_device *pdev)
{
struct glamofb_handle *gfb = platform_get_drvdata(pdev);
+ /* OK let's allow framebuffer ops again */
+// gfb->fb->screen_base = ioremap(gfb->fb_res->start,
+// RESSIZE(gfb->fb_res));
+
fb_set_suspend(gfb->fb, 0);
+// fb_blank(gfb->fb, FB_BLANK_UNBLANK);
return 0;
}