Lines Matching refs:fbi
175 static int ctrl_change_mode(struct fb_info *fbi) in ctrl_change_mode() argument
179 struct omapfb_plane_struct *plane = fbi->par; in ctrl_change_mode()
181 struct fb_var_screeninfo *var = &fbi->var; in ctrl_change_mode()
183 offset = var->yoffset * fbi->fix.line_length + in ctrl_change_mode()
308 static int omapfb_update_full_screen(struct fb_info *fbi);
310 static int omapfb_blank(int blank, struct fb_info *fbi) in omapfb_blank() argument
312 struct omapfb_plane_struct *plane = fbi->par; in omapfb_blank()
346 r = omapfb_update_full_screen(fbi); in omapfb_blank()
351 static void omapfb_sync(struct fb_info *fbi) in omapfb_sync() argument
353 struct omapfb_plane_struct *plane = fbi->par; in omapfb_sync()
366 static void set_fb_fix(struct fb_info *fbi, int from_init) in set_fb_fix() argument
368 struct fb_fix_screeninfo *fix = &fbi->fix; in set_fb_fix()
369 struct fb_var_screeninfo *var = &fbi->var; in set_fb_fix()
370 struct omapfb_plane_struct *plane = fbi->par; in set_fb_fix()
375 fbi->screen_base = rg->vaddr; in set_fb_fix()
378 mutex_lock(&fbi->mm_lock); in set_fb_fix()
381 mutex_unlock(&fbi->mm_lock); in set_fb_fix()
462 static int set_fb_var(struct fb_info *fbi, in set_fb_var() argument
470 struct omapfb_plane_struct *plane = fbi->par; in set_fb_var()
588 struct fb_info *fbi) in omapfb_pan_display() argument
590 struct omapfb_plane_struct *plane = fbi->par; in omapfb_pan_display()
595 if (var->xoffset != fbi->var.xoffset || in omapfb_pan_display()
596 var->yoffset != fbi->var.yoffset) { in omapfb_pan_display()
599 memcpy(new_var, &fbi->var, sizeof(*new_var)); in omapfb_pan_display()
602 if (set_fb_var(fbi, new_var)) in omapfb_pan_display()
605 memcpy(&fbi->var, new_var, sizeof(*new_var)); in omapfb_pan_display()
606 ctrl_change_mode(fbi); in omapfb_pan_display()
615 static int omapfb_mirror(struct fb_info *fbi, int mirror) in omapfb_mirror() argument
617 struct omapfb_plane_struct *plane = fbi->par; in omapfb_mirror()
627 r = ctrl_change_mode(fbi); in omapfb_mirror()
638 static int omapfb_check_var(struct fb_var_screeninfo *var, struct fb_info *fbi) in omapfb_check_var() argument
640 struct omapfb_plane_struct *plane = fbi->par; in omapfb_check_var()
647 r = set_fb_var(fbi, var); in omapfb_check_var()
657 static int omapfb_set_par(struct fb_info *fbi) in omapfb_set_par() argument
659 struct omapfb_plane_struct *plane = fbi->par; in omapfb_set_par()
664 set_fb_fix(fbi, 0); in omapfb_set_par()
665 r = ctrl_change_mode(fbi); in omapfb_set_par()
671 int omapfb_update_window_async(struct fb_info *fbi, in omapfb_update_window_async() argument
677 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_window_async()
679 struct fb_var_screeninfo *var = &fbi->var; in omapfb_update_window_async()
715 return fbdev->ctrl->update_window(fbi, win, callback, callback_data); in omapfb_update_window_async()
719 static int omapfb_update_win(struct fb_info *fbi, in omapfb_update_win() argument
722 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_win()
726 ret = omapfb_update_window_async(fbi, win, NULL, NULL); in omapfb_update_win()
732 static int omapfb_update_full_screen(struct fb_info *fbi) in omapfb_update_full_screen() argument
734 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_full_screen()
745 win.width = fbi->var.xres; in omapfb_update_full_screen()
746 win.height = fbi->var.yres; in omapfb_update_full_screen()
749 win.out_width = fbi->var.xres; in omapfb_update_full_screen()
750 win.out_height = fbi->var.yres; in omapfb_update_full_screen()
754 r = fbdev->ctrl->update_window(fbi, &win, NULL, NULL); in omapfb_update_full_screen()
760 static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) in omapfb_setup_plane() argument
762 struct omapfb_plane_struct *plane = fbi->par; in omapfb_setup_plane()
784 r = ctrl_change_mode(fbi); in omapfb_setup_plane()
800 static int omapfb_query_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) in omapfb_query_plane() argument
802 struct omapfb_plane_struct *plane = fbi->par; in omapfb_query_plane()
808 static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) in omapfb_setup_mem() argument
810 struct omapfb_plane_struct *plane = fbi->par; in omapfb_setup_mem()
843 memcpy(new_var, &fbi->var, sizeof(*new_var)); in omapfb_setup_mem()
844 r = set_fb_var(fbi, new_var); in omapfb_setup_mem()
863 memcpy(&fbi->var, new_var, sizeof(fbi->var)); in omapfb_setup_mem()
864 set_fb_fix(fbi, 0); in omapfb_setup_mem()
871 mutex_lock(&fbi->mm_lock); in omapfb_setup_mem()
872 fbi->fix.smem_start = 0; in omapfb_setup_mem()
873 fbi->fix.smem_len = 0; in omapfb_setup_mem()
874 mutex_unlock(&fbi->mm_lock); in omapfb_setup_mem()
884 static int omapfb_query_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) in omapfb_query_mem() argument
886 struct omapfb_plane_struct *plane = fbi->par; in omapfb_query_mem()
1046 static int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, in omapfb_ioctl() argument
1049 struct omapfb_plane_struct *plane = fbi->par; in omapfb_ioctl()
1051 const struct fb_ops *ops = fbi->fbops; in omapfb_ioctl()
1071 omapfb_mirror(fbi, p.mirror); in omapfb_ioctl()
1074 omapfb_sync(fbi); in omapfb_ioctl()
1101 r = omapfb_update_win(fbi, u); in omapfb_ioctl()
1109 r = omapfb_update_win(fbi, &p.update_window); in omapfb_ioctl()
1116 r = omapfb_setup_plane(fbi, &p.plane_info); in omapfb_ioctl()
1119 if ((r = omapfb_query_plane(fbi, &p.plane_info)) < 0) in omapfb_ioctl()
1130 r = omapfb_setup_mem(fbi, &p.mem_info); in omapfb_ioctl()
1133 if ((r = omapfb_query_mem(fbi, &p.mem_info)) < 0) in omapfb_ioctl()
1474 static void fbinfo_cleanup(struct omapfb_device *fbdev, struct fb_info *fbi) in fbinfo_cleanup() argument
1476 fb_dealloc_cmap(&fbi->cmap); in fbinfo_cleanup()
1493 struct fb_info *fbi; in planes_init() local
1499 fbi = framebuffer_alloc(sizeof(struct omapfb_plane_struct), in planes_init()
1501 if (fbi == NULL) { in planes_init()
1505 plane = fbi->par; in planes_init()
1509 fbdev->fb_info[i] = fbi; in planes_init()
1511 if ((r = fbinfo_init(fbdev, fbi)) < 0) { in planes_init()
1512 framebuffer_release(fbi); in planes_init()
1516 plane->info.out_width = fbi->var.xres; in planes_init()
1517 plane->info.out_height = fbi->var.yres; in planes_init()