summaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-11-29 01:46:12 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-03-12 22:40:54 +0100
commit13f80eea562be6cd58b5bdefc224c87cc0d9288d (patch)
treedb1735b8c88e038ace48cd8eef11e90557b999b6 /drivers/video/sh_mobile_lcdcfb.c
parentd30555d24e462edf439a1057114e1b0df76c89ef (diff)
downloadlinux-13f80eea562be6cd58b5bdefc224c87cc0d9288d.tar.bz2
fbdev: sh_mobile_hdmi: Don't access LCDC fb_info
The LCDC fb_info structure is only used to retrieve the default video mode in case none of the modes advertised by EDID information is acceptable. Pass a pointer to the default mode through the sh_mobile_lcdc_entity structure instead. 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.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index d3299ff543b1..986346dbe05d 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1691,17 +1691,6 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv,
info->pseudo_palette = &ch->pseudo_palette;
info->flags = FBINFO_FLAG_DEFAULT;
- if (cfg->tx_dev) {
- if (!cfg->tx_dev->dev.driver ||
- !try_module_get(cfg->tx_dev->dev.driver->owner)) {
- dev_warn(priv->dev,
- "unable to get transmitter device\n");
- return -EINVAL;
- }
- ch->tx_dev = platform_get_drvdata(cfg->tx_dev);
- ch->tx_dev->lcdc = ch;
- }
-
/* Iterate through the modes to validate them and find the highest
* resolution.
*/
@@ -1742,6 +1731,19 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv,
fb_videomode_to_modelist(mode, num_cfg, &info->modelist);
+ /* Initialize the transmitter device if present. */
+ if (cfg->tx_dev) {
+ if (!cfg->tx_dev->dev.driver ||
+ !try_module_get(cfg->tx_dev->dev.driver->owner)) {
+ dev_warn(priv->dev,
+ "unable to get transmitter device\n");
+ return -EINVAL;
+ }
+ ch->tx_dev = platform_get_drvdata(cfg->tx_dev);
+ ch->tx_dev->lcdc = ch;
+ ch->tx_dev->def_mode = *mode;
+ }
+
/* Initialize variable screen information using the first mode as
* default. The default Y virtual resolution is twice the panel size to
* allow for double-buffering.