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()
325 static int omapfb_update_full_screen(struct fb_info *fbi);
327 static int omapfb_blank(int blank, struct fb_info *fbi) in omapfb_blank() argument
329 struct omapfb_plane_struct *plane = fbi->par; in omapfb_blank()
361 r = omapfb_update_full_screen(fbi); in omapfb_blank()
366 static void omapfb_sync(struct fb_info *fbi) in omapfb_sync() argument
368 struct omapfb_plane_struct *plane = fbi->par; in omapfb_sync()
381 static void set_fb_fix(struct fb_info *fbi, int from_init) in set_fb_fix() argument
383 struct fb_fix_screeninfo *fix = &fbi->fix; in set_fb_fix()
384 struct fb_var_screeninfo *var = &fbi->var; in set_fb_fix()
385 struct omapfb_plane_struct *plane = fbi->par; in set_fb_fix()
390 fbi->screen_base = rg->vaddr; in set_fb_fix()
393 mutex_lock(&fbi->mm_lock); in set_fb_fix()
396 mutex_unlock(&fbi->mm_lock); in set_fb_fix()
476 static int set_fb_var(struct fb_info *fbi, in set_fb_var() argument
484 struct omapfb_plane_struct *plane = fbi->par; in set_fb_var()
598 static void omapfb_rotate(struct fb_info *fbi, int rotate) in omapfb_rotate() argument
600 struct omapfb_plane_struct *plane = fbi->par; in omapfb_rotate()
604 if (rotate != fbi->var.rotate) { in omapfb_rotate()
607 memcpy(new_var, &fbi->var, sizeof(*new_var)); in omapfb_rotate()
609 if (set_fb_var(fbi, new_var) == 0 && in omapfb_rotate()
610 memcmp(new_var, &fbi->var, sizeof(*new_var))) { in omapfb_rotate()
611 memcpy(&fbi->var, new_var, sizeof(*new_var)); in omapfb_rotate()
612 ctrl_change_mode(fbi); in omapfb_rotate()
623 struct fb_info *fbi) in omapfb_pan_display() argument
625 struct omapfb_plane_struct *plane = fbi->par; in omapfb_pan_display()
630 if (var->xoffset != fbi->var.xoffset || in omapfb_pan_display()
631 var->yoffset != fbi->var.yoffset) { in omapfb_pan_display()
634 memcpy(new_var, &fbi->var, sizeof(*new_var)); in omapfb_pan_display()
637 if (set_fb_var(fbi, new_var)) in omapfb_pan_display()
640 memcpy(&fbi->var, new_var, sizeof(*new_var)); in omapfb_pan_display()
641 ctrl_change_mode(fbi); in omapfb_pan_display()
650 static int omapfb_mirror(struct fb_info *fbi, int mirror) in omapfb_mirror() argument
652 struct omapfb_plane_struct *plane = fbi->par; in omapfb_mirror()
662 r = ctrl_change_mode(fbi); in omapfb_mirror()
673 static int omapfb_check_var(struct fb_var_screeninfo *var, struct fb_info *fbi) in omapfb_check_var() argument
675 struct omapfb_plane_struct *plane = fbi->par; in omapfb_check_var()
682 r = set_fb_var(fbi, var); in omapfb_check_var()
692 static int omapfb_set_par(struct fb_info *fbi) in omapfb_set_par() argument
694 struct omapfb_plane_struct *plane = fbi->par; in omapfb_set_par()
699 set_fb_fix(fbi, 0); in omapfb_set_par()
700 r = ctrl_change_mode(fbi); in omapfb_set_par()
706 int omapfb_update_window_async(struct fb_info *fbi, in omapfb_update_window_async() argument
712 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_window_async()
714 struct fb_var_screeninfo *var = &fbi->var; in omapfb_update_window_async()
750 return fbdev->ctrl->update_window(fbi, win, callback, callback_data); in omapfb_update_window_async()
754 static int omapfb_update_win(struct fb_info *fbi, in omapfb_update_win() argument
757 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_win()
761 ret = omapfb_update_window_async(fbi, win, NULL, NULL); in omapfb_update_win()
767 static int omapfb_update_full_screen(struct fb_info *fbi) in omapfb_update_full_screen() argument
769 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_full_screen()
780 win.width = fbi->var.xres; in omapfb_update_full_screen()
781 win.height = fbi->var.yres; in omapfb_update_full_screen()
784 win.out_width = fbi->var.xres; in omapfb_update_full_screen()
785 win.out_height = fbi->var.yres; in omapfb_update_full_screen()
789 r = fbdev->ctrl->update_window(fbi, &win, NULL, NULL); in omapfb_update_full_screen()
795 static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) in omapfb_setup_plane() argument
797 struct omapfb_plane_struct *plane = fbi->par; in omapfb_setup_plane()
819 r = ctrl_change_mode(fbi); in omapfb_setup_plane()
835 static int omapfb_query_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) in omapfb_query_plane() argument
837 struct omapfb_plane_struct *plane = fbi->par; in omapfb_query_plane()
843 static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) in omapfb_setup_mem() argument
845 struct omapfb_plane_struct *plane = fbi->par; in omapfb_setup_mem()
878 memcpy(new_var, &fbi->var, sizeof(*new_var)); in omapfb_setup_mem()
879 r = set_fb_var(fbi, new_var); in omapfb_setup_mem()
898 memcpy(&fbi->var, new_var, sizeof(fbi->var)); in omapfb_setup_mem()
899 set_fb_fix(fbi, 0); in omapfb_setup_mem()
906 mutex_lock(&fbi->mm_lock); in omapfb_setup_mem()
907 fbi->fix.smem_start = 0; in omapfb_setup_mem()
908 fbi->fix.smem_len = 0; in omapfb_setup_mem()
909 mutex_unlock(&fbi->mm_lock); in omapfb_setup_mem()
919 static int omapfb_query_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) in omapfb_query_mem() argument
921 struct omapfb_plane_struct *plane = fbi->par; in omapfb_query_mem()
1080 static int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, in omapfb_ioctl() argument
1083 struct omapfb_plane_struct *plane = fbi->par; in omapfb_ioctl()
1085 struct fb_ops *ops = fbi->fbops; in omapfb_ioctl()
1105 omapfb_mirror(fbi, p.mirror); in omapfb_ioctl()
1108 omapfb_sync(fbi); in omapfb_ioctl()
1135 r = omapfb_update_win(fbi, u); in omapfb_ioctl()
1143 r = omapfb_update_win(fbi, &p.update_window); in omapfb_ioctl()
1150 r = omapfb_setup_plane(fbi, &p.plane_info); in omapfb_ioctl()
1153 if ((r = omapfb_query_plane(fbi, &p.plane_info)) < 0) in omapfb_ioctl()
1164 r = omapfb_setup_mem(fbi, &p.mem_info); in omapfb_ioctl()
1167 if ((r = omapfb_query_mem(fbi, &p.mem_info)) < 0) in omapfb_ioctl()
1509 static void fbinfo_cleanup(struct omapfb_device *fbdev, struct fb_info *fbi) in fbinfo_cleanup() argument
1511 fb_dealloc_cmap(&fbi->cmap); in fbinfo_cleanup()
1528 struct fb_info *fbi; in planes_init() local
1534 fbi = framebuffer_alloc(sizeof(struct omapfb_plane_struct), in planes_init()
1536 if (fbi == NULL) { in planes_init()
1542 plane = fbi->par; in planes_init()
1546 fbdev->fb_info[i] = fbi; in planes_init()
1548 if ((r = fbinfo_init(fbdev, fbi)) < 0) { in planes_init()
1549 framebuffer_release(fbi); in planes_init()
1553 plane->info.out_width = fbi->var.xres; in planes_init()
1554 plane->info.out_height = fbi->var.yres; in planes_init()