Skip to content

Commit

Permalink
Merge branch 'common/fbdev' into fbdev-driver-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Mundt committed Nov 10, 2010
2 parents a7bcf21 + 5fd284e commit 5784fa5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
5 changes: 4 additions & 1 deletion drivers/video/sh_mobile_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,14 +1071,17 @@ static void sh_hdmi_edid_work_fn(struct work_struct *work)
if (!hdmi->info)
goto out;

hdmi->monspec.modedb_len = 0;
fb_destroy_modedb(hdmi->monspec.modedb);
hdmi->monspec.modedb = NULL;

acquire_console_sem();

/* HDMI disconnect */
fb_set_suspend(hdmi->info, 1);

release_console_sem();
pm_runtime_put(hdmi->dev);
fb_destroy_modedb(hdmi->monspec.modedb);
}

out:
Expand Down
21 changes: 12 additions & 9 deletions drivers/video/sh_mobile_lcdcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,16 @@ static const struct fb_videomode default_720p = {
.xres = 1280,
.yres = 720,

.left_margin = 200,
.right_margin = 88,
.hsync_len = 48,
.left_margin = 220,
.right_margin = 110,
.hsync_len = 40,

.upper_margin = 20,
.lower_margin = 5,
.vsync_len = 5,

.pixclock = 13468,
.refresh = 60,
.sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT,
};

Expand Down Expand Up @@ -1197,6 +1198,7 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev)
const struct fb_videomode *mode = cfg->lcd_cfg;
unsigned long max_size = 0;
int k;
int num_cfg;

ch->info = framebuffer_alloc(0, &pdev->dev);
if (!ch->info) {
Expand Down Expand Up @@ -1232,8 +1234,14 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev)
info->fix = sh_mobile_lcdc_fix;
info->fix.smem_len = max_size * (cfg->bpp / 8) * 2;

if (!mode)
if (!mode) {
mode = &default_720p;
num_cfg = 1;
} else {
num_cfg = ch->cfg.num_cfg;
}

fb_videomode_to_modelist(mode, num_cfg, &info->modelist);

fb_videomode_to_var(var, mode);
/* Default Y virtual resolution is 2x panel size */
Expand Down Expand Up @@ -1281,10 +1289,6 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev)

for (i = 0; i < j; i++) {
struct sh_mobile_lcdc_chan *ch = priv->ch + i;
const struct fb_videomode *mode = ch->cfg.lcd_cfg;

if (!mode)
mode = &default_720p;

info = ch->info;

Expand All @@ -1297,7 +1301,6 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev)
}
}

fb_videomode_to_modelist(mode, ch->cfg.num_cfg, &info->modelist);
error = register_framebuffer(info);
if (error < 0)
goto err1;
Expand Down

0 comments on commit 5784fa5

Please sign in to comment.