Laine Walker-Avina wrote:
On Tue, Aug 10, 2010 at 5:16 AM, Stanley.Miao
<stanley.m...@windriver.com> wrote:
<snip>

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
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 ?

Stanley.

 static int generic_panel_suspend(struct omap_dss_device *dssdev)

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to