diff options
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 50963739a40..9b1364723c6 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -115,15 +115,16 @@ static const struct fb_videomode default_720p = { | |||
115 | .xres = 1280, | 115 | .xres = 1280, |
116 | .yres = 720, | 116 | .yres = 720, |
117 | 117 | ||
118 | .left_margin = 200, | 118 | .left_margin = 220, |
119 | .right_margin = 88, | 119 | .right_margin = 110, |
120 | .hsync_len = 48, | 120 | .hsync_len = 40, |
121 | 121 | ||
122 | .upper_margin = 20, | 122 | .upper_margin = 20, |
123 | .lower_margin = 5, | 123 | .lower_margin = 5, |
124 | .vsync_len = 5, | 124 | .vsync_len = 5, |
125 | 125 | ||
126 | .pixclock = 13468, | 126 | .pixclock = 13468, |
127 | .refresh = 60, | ||
127 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, | 128 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, |
128 | }; | 129 | }; |
129 | 130 | ||
@@ -1197,6 +1198,7 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
1197 | const struct fb_videomode *mode = cfg->lcd_cfg; | 1198 | const struct fb_videomode *mode = cfg->lcd_cfg; |
1198 | unsigned long max_size = 0; | 1199 | unsigned long max_size = 0; |
1199 | int k; | 1200 | int k; |
1201 | int num_cfg; | ||
1200 | 1202 | ||
1201 | ch->info = framebuffer_alloc(0, &pdev->dev); | 1203 | ch->info = framebuffer_alloc(0, &pdev->dev); |
1202 | if (!ch->info) { | 1204 | if (!ch->info) { |
@@ -1232,8 +1234,14 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
1232 | info->fix = sh_mobile_lcdc_fix; | 1234 | info->fix = sh_mobile_lcdc_fix; |
1233 | info->fix.smem_len = max_size * (cfg->bpp / 8) * 2; | 1235 | info->fix.smem_len = max_size * (cfg->bpp / 8) * 2; |
1234 | 1236 | ||
1235 | if (!mode) | 1237 | if (!mode) { |
1236 | mode = &default_720p; | 1238 | mode = &default_720p; |
1239 | num_cfg = 1; | ||
1240 | } else { | ||
1241 | num_cfg = ch->cfg.num_cfg; | ||
1242 | } | ||
1243 | |||
1244 | fb_videomode_to_modelist(mode, num_cfg, &info->modelist); | ||
1237 | 1245 | ||
1238 | fb_videomode_to_var(var, mode); | 1246 | fb_videomode_to_var(var, mode); |
1239 | /* Default Y virtual resolution is 2x panel size */ | 1247 | /* Default Y virtual resolution is 2x panel size */ |
@@ -1281,10 +1289,6 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
1281 | 1289 | ||
1282 | for (i = 0; i < j; i++) { | 1290 | for (i = 0; i < j; i++) { |
1283 | struct sh_mobile_lcdc_chan *ch = priv->ch + i; | 1291 | struct sh_mobile_lcdc_chan *ch = priv->ch + i; |
1284 | const struct fb_videomode *mode = ch->cfg.lcd_cfg; | ||
1285 | |||
1286 | if (!mode) | ||
1287 | mode = &default_720p; | ||
1288 | 1292 | ||
1289 | info = ch->info; | 1293 | info = ch->info; |
1290 | 1294 | ||
@@ -1297,7 +1301,6 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
1297 | } | 1301 | } |
1298 | } | 1302 | } |
1299 | 1303 | ||
1300 | fb_videomode_to_modelist(mode, ch->cfg.num_cfg, &info->modelist); | ||
1301 | error = register_framebuffer(info); | 1304 | error = register_framebuffer(info); |
1302 | if (error < 0) | 1305 | if (error < 0) |
1303 | goto err1; | 1306 | goto err1; |