summaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-11-28 23:19:59 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-03-12 22:40:52 +0100
commit458981c3886133667e020900f53538f1fbc3ea1d (patch)
tree6407e8c02cb4715dde31cdef9685f175dae6043b /drivers/video/sh_mobile_lcdcfb.c
parent5864ace19a2546912308e94432c1cf52d5945afe (diff)
downloadblackbird-op-linux-458981c3886133667e020900f53538f1fbc3ea1d.tar.gz
blackbird-op-linux-458981c3886133667e020900f53538f1fbc3ea1d.zip
fbdev: sh_mobile_lcdc: Return display connection state in display_on
Return true if the display is connected and false otherwise. Set the fb info state to FBINFO_STATE_SUSPENDED in the sh_mobile_lcdc driver when the display is not connected. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 03ee3826fb62..5a19ef3f215c 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -338,8 +338,14 @@ static void sh_mobile_lcdc_display_on(struct sh_mobile_lcdc_chan *ch)
struct sh_mobile_lcdc_panel_cfg *panel = &ch->cfg.panel_cfg;
if (ch->tx_dev) {
- if (ch->tx_dev->ops->display_on(ch->tx_dev) < 0)
+ int ret;
+
+ ret = ch->tx_dev->ops->display_on(ch->tx_dev);
+ if (ret < 0)
return;
+
+ if (ret == SH_MOBILE_LCDC_DISPLAY_DISCONNECTED)
+ ch->info->state = FBINFO_STATE_SUSPENDED;
}
/* HDMI must be enabled before LCDC configuration */
OpenPOWER on IntegriCloud