diff options
author | Stanley.Miao <stanley.miao@windriver.com> | 2010-09-03 05:03:48 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-10-22 23:21:14 +0300 |
commit | 18016e35d448d35739f8640b51476709c07e95db (patch) | |
tree | f01f76bd471332308d6e7c22af6310386437d121 /drivers/video/omap2/displays/panel-toppoly-tdo35s.c | |
parent | 41814cfc01b059df33011d929837558c22f3c0e0 (diff) | |
download | linux-18016e35d448d35739f8640b51476709c07e95db.tar.gz linux-18016e35d448d35739f8640b51476709c07e95db.tar.bz2 linux-18016e35d448d35739f8640b51476709c07e95db.zip |
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-toppoly-tdo35s.c')
-rw-r--r-- | drivers/video/omap2/displays/panel-toppoly-tdo35s.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/omap2/displays/panel-toppoly-tdo35s.c b/drivers/video/omap2/displays/panel-toppoly-tdo35s.c index e320e67d06f3..526e906c8a6c 100644 --- a/drivers/video/omap2/displays/panel-toppoly-tdo35s.c +++ b/drivers/video/omap2/displays/panel-toppoly-tdo35s.c @@ -46,6 +46,9 @@ static int toppoly_tdo_panel_power_on(struct omap_dss_device *dssdev) { int r; + if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) + return 0; + r = omapdss_dpi_display_enable(dssdev); if (r) goto err0; @@ -65,6 +68,9 @@ err0: static void toppoly_tdo_panel_power_off(struct omap_dss_device *dssdev) { + if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) + return; + if (dssdev->platform_disable) dssdev->platform_disable(dssdev); |