Lines Matching refs:fbi
177 static int ctrl_change_mode(struct fb_info *fbi)
181 struct omapfb_plane_struct *plane = fbi->par;
183 struct fb_var_screeninfo *var = &fbi->var;
185 offset = var->yoffset * fbi->fix.line_length +
310 static int omapfb_update_full_screen(struct fb_info *fbi);
312 static int omapfb_blank(int blank, struct fb_info *fbi)
314 struct omapfb_plane_struct *plane = fbi->par;
348 r = omapfb_update_full_screen(fbi);
353 static void omapfb_sync(struct fb_info *fbi)
355 struct omapfb_plane_struct *plane = fbi->par;
368 static void set_fb_fix(struct fb_info *fbi, int from_init)
370 struct fb_fix_screeninfo *fix = &fbi->fix;
371 struct fb_var_screeninfo *var = &fbi->var;
372 struct omapfb_plane_struct *plane = fbi->par;
377 fbi->screen_base = rg->vaddr;
380 mutex_lock(&fbi->mm_lock);
383 mutex_unlock(&fbi->mm_lock);
464 static int set_fb_var(struct fb_info *fbi,
472 struct omapfb_plane_struct *plane = fbi->par;
596 struct fb_info *fbi)
598 struct omapfb_plane_struct *plane = fbi->par;
603 if (var->xoffset != fbi->var.xoffset ||
604 var->yoffset != fbi->var.yoffset) {
607 memcpy(new_var, &fbi->var, sizeof(*new_var));
610 if (set_fb_var(fbi, new_var))
613 memcpy(&fbi->var, new_var, sizeof(*new_var));
614 ctrl_change_mode(fbi);
623 static int omapfb_mirror(struct fb_info *fbi, int mirror)
625 struct omapfb_plane_struct *plane = fbi->par;
635 r = ctrl_change_mode(fbi);
646 static int omapfb_check_var(struct fb_var_screeninfo *var, struct fb_info *fbi)
648 struct omapfb_plane_struct *plane = fbi->par;
655 r = set_fb_var(fbi, var);
665 static int omapfb_set_par(struct fb_info *fbi)
667 struct omapfb_plane_struct *plane = fbi->par;
672 set_fb_fix(fbi, 0);
673 r = ctrl_change_mode(fbi);
679 static int omapfb_update_window_async(struct fb_info *fbi,
685 struct omapfb_plane_struct *plane = fbi->par;
687 struct fb_var_screeninfo *var = &fbi->var;
723 return fbdev->ctrl->update_window(fbi, win, callback, callback_data);
726 static int omapfb_update_win(struct fb_info *fbi,
729 struct omapfb_plane_struct *plane = fbi->par;
733 ret = omapfb_update_window_async(fbi, win, NULL, NULL);
739 static int omapfb_update_full_screen(struct fb_info *fbi)
741 struct omapfb_plane_struct *plane = fbi->par;
752 win.width = fbi->var.xres;
753 win.height = fbi->var.yres;
756 win.out_width = fbi->var.xres;
757 win.out_height = fbi->var.yres;
761 r = fbdev->ctrl->update_window(fbi, &win, NULL, NULL);
767 static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
769 struct omapfb_plane_struct *plane = fbi->par;
791 r = ctrl_change_mode(fbi);
807 static int omapfb_query_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
809 struct omapfb_plane_struct *plane = fbi->par;
815 static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi)
817 struct omapfb_plane_struct *plane = fbi->par;
850 memcpy(new_var, &fbi->var, sizeof(*new_var));
851 r = set_fb_var(fbi, new_var);
870 memcpy(&fbi->var, new_var, sizeof(fbi->var));
871 set_fb_fix(fbi, 0);
878 mutex_lock(&fbi->mm_lock);
879 fbi->fix.smem_start = 0;
880 fbi->fix.smem_len = 0;
881 mutex_unlock(&fbi->mm_lock);
891 static int omapfb_query_mem(struct fb_info *fbi, struct omapfb_mem_info *mi)
893 struct omapfb_plane_struct *plane = fbi->par;
1053 static int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd,
1056 struct omapfb_plane_struct *plane = fbi->par;
1058 const struct fb_ops *ops = fbi->fbops;
1078 omapfb_mirror(fbi, p.mirror);
1081 omapfb_sync(fbi);
1108 r = omapfb_update_win(fbi, u);
1116 r = omapfb_update_win(fbi, &p.update_window);
1123 r = omapfb_setup_plane(fbi, &p.plane_info);
1126 if ((r = omapfb_query_plane(fbi, &p.plane_info)) < 0)
1137 r = omapfb_setup_mem(fbi, &p.mem_info);
1140 if ((r = omapfb_query_mem(fbi, &p.mem_info)) < 0)
1472 static void fbinfo_cleanup(struct omapfb_device *fbdev, struct fb_info *fbi)
1474 fb_dealloc_cmap(&fbi->cmap);
1491 struct fb_info *fbi;
1497 fbi = framebuffer_alloc(sizeof(struct omapfb_plane_struct),
1499 if (fbi == NULL) {
1503 plane = fbi->par;
1507 fbdev->fb_info[i] = fbi;
1509 if ((r = fbinfo_init(fbdev, fbi)) < 0) {
1510 framebuffer_release(fbi);
1514 plane->info.out_width = fbi->var.xres;
1515 plane->info.out_height = fbi->var.yres;