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 22:21:14 +0200 |
commit | 18016e35d448d35739f8640b51476709c07e95db (patch) | |
tree | f01f76bd471332308d6e7c22af6310386437d121 /drivers/video/omap2/displays/panel-tpo-td043mtea1.c | |
parent | OMAP: DSS2: OMAPFB: Allow usage of def_vrfb only for omap2,3 (diff) | |
download | linux-18016e35d448d35739f8640b51476709c07e95db.tar.xz 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-tpo-td043mtea1.c')
-rw-r--r-- | drivers/video/omap2/displays/panel-tpo-td043mtea1.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c index e866e76b13d0..dbe9d43b4850 100644 --- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c +++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c @@ -269,6 +269,9 @@ static int tpo_td043_power_on(struct omap_dss_device *dssdev) int nreset_gpio = dssdev->reset_gpio; int r; + if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) + return 0; + r = omapdss_dpi_display_enable(dssdev); if (r) goto err0; @@ -308,6 +311,9 @@ static void tpo_td043_power_off(struct omap_dss_device *dssdev) struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&dssdev->dev); int nreset_gpio = dssdev->reset_gpio; + if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) + return; + tpo_td043_write(tpo_td043->spi, 3, TPO_R03_VAL_STANDBY | TPO_R03_EN_PWM); |