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-acx565akm.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-acx565akm.c')
-rw-r--r-- | drivers/video/omap2/displays/panel-acx565akm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/omap2/displays/panel-acx565akm.c b/drivers/video/omap2/displays/panel-acx565akm.c index 07fbb8a733bb..e77310653207 100644 --- a/drivers/video/omap2/displays/panel-acx565akm.c +++ b/drivers/video/omap2/displays/panel-acx565akm.c @@ -587,6 +587,9 @@ static int acx_panel_power_on(struct omap_dss_device *dssdev) dev_dbg(&dssdev->dev, "%s\n", __func__); + if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) + return 0; + mutex_lock(&md->mutex); r = omapdss_sdi_display_enable(dssdev); @@ -644,6 +647,9 @@ static void acx_panel_power_off(struct omap_dss_device *dssdev) dev_dbg(&dssdev->dev, "%s\n", __func__); + if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) + return; + mutex_lock(&md->mutex); if (!md->enabled) { |