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 static 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()
718 static int omapfb_update_win(struct fb_info *fbi, in omapfb_update_win() argument
721 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_win()
725 ret = omapfb_update_window_async(fbi, win, NULL, NULL); in omapfb_update_win()
731 static int omapfb_update_full_screen(struct fb_info *fbi) in omapfb_update_full_screen() argument
733 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_full_screen()
744 win.width = fbi->var.xres; in omapfb_update_full_screen()
745 win.height = fbi->var.yres; in omapfb_update_full_screen()
748 win.out_width = fbi->var.xres; in omapfb_update_full_screen()
749 win.out_height = fbi->var.yres; in omapfb_update_full_screen()
753 r = fbdev->ctrl->update_window(fbi, &win, NULL, NULL); in omapfb_update_full_screen()
759 static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) in omapfb_setup_plane() argument
761 struct omapfb_plane_struct *plane = fbi->par; in omapfb_setup_plane()
783 r = ctrl_change_mode(fbi); in omapfb_setup_plane()
799 static int omapfb_query_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) in omapfb_query_plane() argument
801 struct omapfb_plane_struct *plane = fbi->par; in omapfb_query_plane()
807 static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) in omapfb_setup_mem() argument
809 struct omapfb_plane_struct *plane = fbi->par; in omapfb_setup_mem()
842 memcpy(new_var, &fbi->var, sizeof(*new_var)); in omapfb_setup_mem()
843 r = set_fb_var(fbi, new_var); in omapfb_setup_mem()
862 memcpy(&fbi->var, new_var, sizeof(fbi->var)); in omapfb_setup_mem()
863 set_fb_fix(fbi, 0); in omapfb_setup_mem()
870 mutex_lock(&fbi->mm_lock); in omapfb_setup_mem()
871 fbi->fix.smem_start = 0; in omapfb_setup_mem()
872 fbi->fix.smem_len = 0; in omapfb_setup_mem()
873 mutex_unlock(&fbi->mm_lock); in omapfb_setup_mem()
883 static int omapfb_query_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) in omapfb_query_mem() argument
885 struct omapfb_plane_struct *plane = fbi->par; in omapfb_query_mem()
1045 static int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, in omapfb_ioctl() argument
1048 struct omapfb_plane_struct *plane = fbi->par; in omapfb_ioctl()
1050 const struct fb_ops *ops = fbi->fbops; in omapfb_ioctl()
1070 omapfb_mirror(fbi, p.mirror); in omapfb_ioctl()
1073 omapfb_sync(fbi); in omapfb_ioctl()
1100 r = omapfb_update_win(fbi, u); in omapfb_ioctl()
1108 r = omapfb_update_win(fbi, &p.update_window); in omapfb_ioctl()
1115 r = omapfb_setup_plane(fbi, &p.plane_info); in omapfb_ioctl()
1118 if ((r = omapfb_query_plane(fbi, &p.plane_info)) < 0) in omapfb_ioctl()
1129 r = omapfb_setup_mem(fbi, &p.mem_info); in omapfb_ioctl()
1132 if ((r = omapfb_query_mem(fbi, &p.mem_info)) < 0) in omapfb_ioctl()
1473 static void fbinfo_cleanup(struct omapfb_device *fbdev, struct fb_info *fbi) in fbinfo_cleanup() argument
1475 fb_dealloc_cmap(&fbi->cmap); in fbinfo_cleanup()
1492 struct fb_info *fbi; in planes_init() local
1498 fbi = framebuffer_alloc(sizeof(struct omapfb_plane_struct), in planes_init()
1500 if (fbi == NULL) { in planes_init()
1504 plane = fbi->par; in planes_init()
1508 fbdev->fb_info[i] = fbi; in planes_init()
1510 if ((r = fbinfo_init(fbdev, fbi)) < 0) { in planes_init()
1511 framebuffer_release(fbi); in planes_init()
1515 plane->info.out_width = fbi->var.xres; in planes_init()
1516 plane->info.out_height = fbi->var.yres; in planes_init()