On 08/11/2010 11:09 AM, stanley.miao wrote: > Laine Walker-Avina wrote: >> On Tue, Aug 10, 2010 at 5:16 AM, Stanley.Miao >> <stanley.miao@xxxxxxxxxxxxx> wrote: >> >>> <snip> >>> >>> -- >>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in >>> the body of a message to majordomo@xxxxxxxxxxxxxxx >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>> >>> >> >> Instead of adding a new variable and a bunch of extra code, I solved >> this problem on my local tree by just not doing anything if we're >> already not active. See the follwoing for the generic panel driver. >> >> diff --git a/drivers/video/omap2/displays/panel-generic.c >> b/drivers/video/omap2/displays/panel-generic.c >> index 300eff5..abc03f4 100644 >> --- a/drivers/video/omap2/displays/panel-generic.c >> +++ b/drivers/video/omap2/displays/panel-generic.c >> @@ -91,9 +91,12 @@ static int generic_panel_enable(struct >> omap_dss_device *dssdev) >> >> static void generic_panel_disable(struct omap_dss_device *dssdev) >> { >> - generic_panel_power_off(dssdev); >> + if(dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) >> + { >> + generic_panel_power_off(dssdev); >> >> - dssdev->state = OMAP_DSS_DISPLAY_DISABLED; >> + dssdev->state = OMAP_DSS_DISPLAY_DISABLED; >> + } >> } >> >> > > Yes, This is a good idea. If we add this check into power_off(), will it > be better ? How do you think ? > Both you guys' patches can solve a issue here: https://bugs.edge.launchpad.net/ubuntu/+source/linux-ti-omap/+bug/588243 Laine, I suspect we still need whose checks in suspend/resume routines, Stanley's V2 patch should be better. Although I did following test on my Beagle board, I failed to see any oops. root@beagle1:/# echo 1 > /sys/devices/platform/omapfb/graphics/fb0/blank root@beagle1:/# echo mem > /sys/power/state Thanks, -- Bryan Wu <bryan.wu@xxxxxxxxxxxxx> Kernel Developer +86.138-1617-6545 Mobile Ubuntu Kernel Team | Hardware Enablement Team Canonical Ltd. www.canonical.com Ubuntu - Linux for human beings | www.ubuntu.com -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html