Lines Matching refs:fbi

192 static int ctrl_change_mode(struct fb_info *fbi)  in ctrl_change_mode()  argument
196 struct omapfb_plane_struct *plane = fbi->par; in ctrl_change_mode()
198 struct fb_var_screeninfo *var = &fbi->var; in ctrl_change_mode()
200 offset = var->yoffset * fbi->fix.line_length + in ctrl_change_mode()
330 static int omapfb_update_full_screen(struct fb_info *fbi);
332 static int omapfb_blank(int blank, struct fb_info *fbi) in omapfb_blank() argument
334 struct omapfb_plane_struct *plane = fbi->par; in omapfb_blank()
366 r = omapfb_update_full_screen(fbi); in omapfb_blank()
371 static void omapfb_sync(struct fb_info *fbi) in omapfb_sync() argument
373 struct omapfb_plane_struct *plane = fbi->par; in omapfb_sync()
386 static void set_fb_fix(struct fb_info *fbi, int from_init) in set_fb_fix() argument
388 struct fb_fix_screeninfo *fix = &fbi->fix; in set_fb_fix()
389 struct fb_var_screeninfo *var = &fbi->var; in set_fb_fix()
390 struct omapfb_plane_struct *plane = fbi->par; in set_fb_fix()
395 fbi->screen_base = rg->vaddr; in set_fb_fix()
398 mutex_lock(&fbi->mm_lock); in set_fb_fix()
401 mutex_unlock(&fbi->mm_lock); in set_fb_fix()
481 static int set_fb_var(struct fb_info *fbi, in set_fb_var() argument
489 struct omapfb_plane_struct *plane = fbi->par; in set_fb_var()
603 static void omapfb_rotate(struct fb_info *fbi, int rotate) in omapfb_rotate() argument
605 struct omapfb_plane_struct *plane = fbi->par; in omapfb_rotate()
609 if (rotate != fbi->var.rotate) { in omapfb_rotate()
612 memcpy(new_var, &fbi->var, sizeof(*new_var)); in omapfb_rotate()
614 if (set_fb_var(fbi, new_var) == 0 && in omapfb_rotate()
615 memcmp(new_var, &fbi->var, sizeof(*new_var))) { in omapfb_rotate()
616 memcpy(&fbi->var, new_var, sizeof(*new_var)); in omapfb_rotate()
617 ctrl_change_mode(fbi); in omapfb_rotate()
628 struct fb_info *fbi) in omapfb_pan_display() argument
630 struct omapfb_plane_struct *plane = fbi->par; in omapfb_pan_display()
635 if (var->xoffset != fbi->var.xoffset || in omapfb_pan_display()
636 var->yoffset != fbi->var.yoffset) { in omapfb_pan_display()
639 memcpy(new_var, &fbi->var, sizeof(*new_var)); in omapfb_pan_display()
642 if (set_fb_var(fbi, new_var)) in omapfb_pan_display()
645 memcpy(&fbi->var, new_var, sizeof(*new_var)); in omapfb_pan_display()
646 ctrl_change_mode(fbi); in omapfb_pan_display()
655 static int omapfb_mirror(struct fb_info *fbi, int mirror) in omapfb_mirror() argument
657 struct omapfb_plane_struct *plane = fbi->par; in omapfb_mirror()
667 r = ctrl_change_mode(fbi); in omapfb_mirror()
678 static int omapfb_check_var(struct fb_var_screeninfo *var, struct fb_info *fbi) in omapfb_check_var() argument
680 struct omapfb_plane_struct *plane = fbi->par; in omapfb_check_var()
687 r = set_fb_var(fbi, var); in omapfb_check_var()
697 static int omapfb_set_par(struct fb_info *fbi) in omapfb_set_par() argument
699 struct omapfb_plane_struct *plane = fbi->par; in omapfb_set_par()
704 set_fb_fix(fbi, 0); in omapfb_set_par()
705 r = ctrl_change_mode(fbi); in omapfb_set_par()
711 int omapfb_update_window_async(struct fb_info *fbi, in omapfb_update_window_async() argument
717 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_window_async()
719 struct fb_var_screeninfo *var = &fbi->var; in omapfb_update_window_async()
755 return fbdev->ctrl->update_window(fbi, win, callback, callback_data); in omapfb_update_window_async()
759 static int omapfb_update_win(struct fb_info *fbi, in omapfb_update_win() argument
762 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_win()
766 ret = omapfb_update_window_async(fbi, win, NULL, NULL); in omapfb_update_win()
772 static int omapfb_update_full_screen(struct fb_info *fbi) in omapfb_update_full_screen() argument
774 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_full_screen()
785 win.width = fbi->var.xres; in omapfb_update_full_screen()
786 win.height = fbi->var.yres; in omapfb_update_full_screen()
789 win.out_width = fbi->var.xres; in omapfb_update_full_screen()
790 win.out_height = fbi->var.yres; in omapfb_update_full_screen()
794 r = fbdev->ctrl->update_window(fbi, &win, NULL, NULL); in omapfb_update_full_screen()
800 static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) in omapfb_setup_plane() argument
802 struct omapfb_plane_struct *plane = fbi->par; in omapfb_setup_plane()
824 r = ctrl_change_mode(fbi); in omapfb_setup_plane()
840 static int omapfb_query_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) in omapfb_query_plane() argument
842 struct omapfb_plane_struct *plane = fbi->par; in omapfb_query_plane()
848 static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) in omapfb_setup_mem() argument
850 struct omapfb_plane_struct *plane = fbi->par; in omapfb_setup_mem()
883 memcpy(new_var, &fbi->var, sizeof(*new_var)); in omapfb_setup_mem()
884 r = set_fb_var(fbi, new_var); in omapfb_setup_mem()
903 memcpy(&fbi->var, new_var, sizeof(fbi->var)); in omapfb_setup_mem()
904 set_fb_fix(fbi, 0); in omapfb_setup_mem()
911 mutex_lock(&fbi->mm_lock); in omapfb_setup_mem()
912 fbi->fix.smem_start = 0; in omapfb_setup_mem()
913 fbi->fix.smem_len = 0; in omapfb_setup_mem()
914 mutex_unlock(&fbi->mm_lock); in omapfb_setup_mem()
924 static int omapfb_query_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) in omapfb_query_mem() argument
926 struct omapfb_plane_struct *plane = fbi->par; in omapfb_query_mem()
1085 static int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, in omapfb_ioctl() argument
1088 struct omapfb_plane_struct *plane = fbi->par; in omapfb_ioctl()
1090 struct fb_ops *ops = fbi->fbops; in omapfb_ioctl()
1110 omapfb_mirror(fbi, p.mirror); in omapfb_ioctl()
1113 omapfb_sync(fbi); in omapfb_ioctl()
1140 r = omapfb_update_win(fbi, u); in omapfb_ioctl()
1148 r = omapfb_update_win(fbi, &p.update_window); in omapfb_ioctl()
1155 r = omapfb_setup_plane(fbi, &p.plane_info); in omapfb_ioctl()
1158 if ((r = omapfb_query_plane(fbi, &p.plane_info)) < 0) in omapfb_ioctl()
1169 r = omapfb_setup_mem(fbi, &p.mem_info); in omapfb_ioctl()
1172 if ((r = omapfb_query_mem(fbi, &p.mem_info)) < 0) in omapfb_ioctl()
1514 static void fbinfo_cleanup(struct omapfb_device *fbdev, struct fb_info *fbi) in fbinfo_cleanup() argument
1516 fb_dealloc_cmap(&fbi->cmap); in fbinfo_cleanup()
1533 struct fb_info *fbi; in planes_init() local
1539 fbi = framebuffer_alloc(sizeof(struct omapfb_plane_struct), in planes_init()
1541 if (fbi == NULL) { in planes_init()
1547 plane = fbi->par; in planes_init()
1551 fbdev->fb_info[i] = fbi; in planes_init()
1553 if ((r = fbinfo_init(fbdev, fbi)) < 0) { in planes_init()
1554 framebuffer_release(fbi); in planes_init()
1558 plane->info.out_width = fbi->var.xres; in planes_init()
1559 plane->info.out_height = fbi->var.yres; in planes_init()