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/video/console/fbcon.c | 3 +++ drivers/video/display/jbt6k74.c | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 6b666a50e3a..285acaeafe8 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -401,6 +401,9 @@ static void fb_flashcursor(struct work_struct *work) int c; int mode; + if (info->state != FBINFO_STATE_RUNNING) + return; + acquire_console_sem(); if (ops && ops->currcon != -1) vc = vc_cons[ops->currcon].d; diff --git a/drivers/video/display/jbt6k74.c b/drivers/video/display/jbt6k74.c index 807d6b538f7..77f9528ff5a 100644 --- a/drivers/video/display/jbt6k74.c +++ b/drivers/video/display/jbt6k74.c @@ -692,14 +692,6 @@ int jbt6k74_resume(struct spi_device *spi) struct jbt_info *jbt = dev_get_drvdata(&spi->dev); struct jbt6k74_platform_data *jbt6k74_pdata = spi->dev.platform_data; - /* we can get called twice with all dependencies resumed if our core - * resume callback is last of all. Protect against doing anything twice - */ - if (jbt->have_resumed) - return 0; - - jbt->have_resumed |= 1; - switch (jbt->last_state) { case JBT_STATE_QVGA_NORMAL: jbt6k74_enter_state(jbt, JBT_STATE_QVGA_NORMAL); -- cgit v1.2.3