return retval;
}
-
static struct fb_ops sh_mobile_lcdc_ops = {
.owner = THIS_MODULE,
.fb_setcolreg = sh_mobile_lcdc_setcolreg,
var = &info->var;
lcd_cfg = &cfg->lcd_cfg;
info->fbops = &sh_mobile_lcdc_ops;
- var->xres = var->xres_virtual = lcd_cfg->xres;
- var->yres = lcd_cfg->yres;
+ fb_videomode_to_var(var, lcd_cfg);
/* Default Y virtual resolution is 2x panel size */
var->yres_virtual = var->yres * 2;
- var->width = cfg->lcd_size_cfg.width;
- var->height = cfg->lcd_size_cfg.height;
- var->activate = FB_ACTIVATE_NOW;
- var->left_margin = lcd_cfg->left_margin;
- var->right_margin = lcd_cfg->right_margin;
- var->upper_margin = lcd_cfg->upper_margin;
- var->lower_margin = lcd_cfg->lower_margin;
- var->hsync_len = lcd_cfg->hsync_len;
- var->vsync_len = lcd_cfg->vsync_len;
- var->sync = lcd_cfg->sync;
- var->pixclock = lcd_cfg->pixclock;
error = sh_mobile_lcdc_set_bpp(var, cfg->bpp);
if (error)
break;
}
- memset(buf, 0, info->fix.smem_len);
info->fix.smem_start = priv->ch[i].dma_handle;
info->screen_base = buf;
info->device = &pdev->dev;