From 6e0df963162d04cb4243155a0137faa12516d9a2 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 19 Nov 2008 17:11:11 +0000 Subject: 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 --- drivers/mfd/glamo/glamo-fb.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'drivers/mfd/glamo/glamo-fb.c') 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; } -- cgit v1.2.3