static int osd_cursor(struct fb_info *fbi, struct fb_cursor *var);
+static int osd_set_fb_var(int index, const struct vinfo_s *vinfo)
+{
+ if ((vinfo->width < 0) || (vinfo->height < 0)) {
+ pr_err("invalid vinfo\n");
+ return 1;
+ }
+
+ fb_def_var[index].xres = vinfo->width;
+ fb_def_var[index].yres = vinfo->height;
+ fb_def_var[index].xres_virtual = vinfo->width;
+ fb_def_var[index].yres_virtual = vinfo->height * 2;
+ fb_def_var[index].bits_per_pixel = 32;
+
+ return 0;
+}
+
phys_addr_t get_fb_rmem_paddr(int index)
{
if (index < 0 || index > 1)
if (ret)
osd_log_info("not found display_size_default\n");
else {
- fb_def_var[index].xres = var_screeninfo[0];
- fb_def_var[index].yres = var_screeninfo[1];
- fb_def_var[index].xres_virtual =
- var_screeninfo[2];
- fb_def_var[index].yres_virtual =
- var_screeninfo[3];
- fb_def_var[index].bits_per_pixel =
- var_screeninfo[4];
- osd_log_info("init fbdev bpp is:%d\n",
+ if (osd_set_fb_var(index, vinfo)) {
+ /* no available vinfo, set default */
+ fb_def_var[index].xres =
+ var_screeninfo[0];
+ fb_def_var[index].yres =
+ var_screeninfo[1];
+ fb_def_var[index].xres_virtual =
+ var_screeninfo[2];
+ fb_def_var[index].yres_virtual =
+ var_screeninfo[3];
+ fb_def_var[index].bits_per_pixel =
+ var_screeninfo[4];
+ }
+ pr_info("fb def : %d %d %d %d %d\n",
+ fb_def_var[index].xres,
+ fb_def_var[index].yres,
+ fb_def_var[index].xres_virtual,
+ fb_def_var[index].yres_virtual,
fb_def_var[index].bits_per_pixel);
+ pr_info("init fbdev bpp is:%d\n",
+ fb_def_var[index].bits_per_pixel);
+
if (fb_def_var[index].bits_per_pixel > 32)
fb_def_var[index].bits_per_pixel = 32;
}