diff options
author | Stanley.Miao <stanley.miao@windriver.com> | 2010-09-03 07:03:48 +0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-10-23 00:21:14 +0400 |
commit | 18016e35d448d35739f8640b51476709c07e95db (patch) | |
tree | f01f76bd471332308d6e7c22af6310386437d121 /drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c | |
parent | 41814cfc01b059df33011d929837558c22f3c0e0 (diff) | |
download | linux-18016e35d448d35739f8640b51476709c07e95db.tar.xz |
OMAP: DSS2: don't power off a panel twice
If we blank the panel by
echo 1 > /sys/devices/platform/omapfb/graphics/fb0/blank
Then, we reboot the sytem, the kernel will crash at
drivers/video/omap2/dss/core.c:323
This is because the panel is closed twice. Now check the state of a dssdev
to forbid a panel is power on or power off twice.
Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c')
-rw-r--r-- | drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c index 7d9eb2b1f5af..9a138f650e05 100644 --- a/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c +++ b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c @@ -135,6 +135,9 @@ static int sharp_ls_power_on(struct omap_dss_device *dssdev) { int r = 0; + if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) + return 0; + r = omapdss_dpi_display_enable(dssdev); if (r) goto err0; @@ -157,6 +160,9 @@ err0: static void sharp_ls_power_off(struct omap_dss_device *dssdev) { + if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) + return; + if (dssdev->platform_disable) dssdev->platform_disable(dssdev); |