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()
363 r = omapfb_update_full_screen(fbi); in omapfb_blank()
368 static void omapfb_sync(struct fb_info *fbi) in omapfb_sync() argument
370 struct omapfb_plane_struct *plane = fbi->par; in omapfb_sync()
383 static void set_fb_fix(struct fb_info *fbi, int from_init) in set_fb_fix() argument
385 struct fb_fix_screeninfo *fix = &fbi->fix; in set_fb_fix()
386 struct fb_var_screeninfo *var = &fbi->var; in set_fb_fix()
387 struct omapfb_plane_struct *plane = fbi->par; in set_fb_fix()
392 fbi->screen_base = rg->vaddr; in set_fb_fix()
395 mutex_lock(&fbi->mm_lock); in set_fb_fix()
398 mutex_unlock(&fbi->mm_lock); in set_fb_fix()
478 static int set_fb_var(struct fb_info *fbi, in set_fb_var() argument
486 struct omapfb_plane_struct *plane = fbi->par; in set_fb_var()
604 struct fb_info *fbi) in omapfb_pan_display() argument
606 struct omapfb_plane_struct *plane = fbi->par; in omapfb_pan_display()
611 if (var->xoffset != fbi->var.xoffset || in omapfb_pan_display()
612 var->yoffset != fbi->var.yoffset) { in omapfb_pan_display()
615 memcpy(new_var, &fbi->var, sizeof(*new_var)); in omapfb_pan_display()
618 if (set_fb_var(fbi, new_var)) in omapfb_pan_display()
621 memcpy(&fbi->var, new_var, sizeof(*new_var)); in omapfb_pan_display()
622 ctrl_change_mode(fbi); in omapfb_pan_display()
631 static int omapfb_mirror(struct fb_info *fbi, int mirror) in omapfb_mirror() argument
633 struct omapfb_plane_struct *plane = fbi->par; in omapfb_mirror()
643 r = ctrl_change_mode(fbi); in omapfb_mirror()
654 static int omapfb_check_var(struct fb_var_screeninfo *var, struct fb_info *fbi) in omapfb_check_var() argument
656 struct omapfb_plane_struct *plane = fbi->par; in omapfb_check_var()
663 r = set_fb_var(fbi, var); in omapfb_check_var()
673 static int omapfb_set_par(struct fb_info *fbi) in omapfb_set_par() argument
675 struct omapfb_plane_struct *plane = fbi->par; in omapfb_set_par()
680 set_fb_fix(fbi, 0); in omapfb_set_par()
681 r = ctrl_change_mode(fbi); in omapfb_set_par()
687 int omapfb_update_window_async(struct fb_info *fbi, in omapfb_update_window_async() argument
693 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_window_async()
695 struct fb_var_screeninfo *var = &fbi->var; in omapfb_update_window_async()
731 return fbdev->ctrl->update_window(fbi, win, callback, callback_data); in omapfb_update_window_async()
735 static int omapfb_update_win(struct fb_info *fbi, in omapfb_update_win() argument
738 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_win()
742 ret = omapfb_update_window_async(fbi, win, NULL, NULL); in omapfb_update_win()
748 static int omapfb_update_full_screen(struct fb_info *fbi) in omapfb_update_full_screen() argument
750 struct omapfb_plane_struct *plane = fbi->par; in omapfb_update_full_screen()
761 win.width = fbi->var.xres; in omapfb_update_full_screen()
762 win.height = fbi->var.yres; in omapfb_update_full_screen()
765 win.out_width = fbi->var.xres; in omapfb_update_full_screen()
766 win.out_height = fbi->var.yres; in omapfb_update_full_screen()
770 r = fbdev->ctrl->update_window(fbi, &win, NULL, NULL); in omapfb_update_full_screen()
776 static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) in omapfb_setup_plane() argument
778 struct omapfb_plane_struct *plane = fbi->par; in omapfb_setup_plane()
800 r = ctrl_change_mode(fbi); in omapfb_setup_plane()
816 static int omapfb_query_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) in omapfb_query_plane() argument
818 struct omapfb_plane_struct *plane = fbi->par; in omapfb_query_plane()
824 static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) in omapfb_setup_mem() argument
826 struct omapfb_plane_struct *plane = fbi->par; in omapfb_setup_mem()
859 memcpy(new_var, &fbi->var, sizeof(*new_var)); in omapfb_setup_mem()
860 r = set_fb_var(fbi, new_var); in omapfb_setup_mem()
879 memcpy(&fbi->var, new_var, sizeof(fbi->var)); in omapfb_setup_mem()
880 set_fb_fix(fbi, 0); in omapfb_setup_mem()
887 mutex_lock(&fbi->mm_lock); in omapfb_setup_mem()
888 fbi->fix.smem_start = 0; in omapfb_setup_mem()
889 fbi->fix.smem_len = 0; in omapfb_setup_mem()
890 mutex_unlock(&fbi->mm_lock); in omapfb_setup_mem()
900 static int omapfb_query_mem(struct fb_info *fbi, struct omapfb_mem_info *mi) in omapfb_query_mem() argument
902 struct omapfb_plane_struct *plane = fbi->par; in omapfb_query_mem()
1062 static int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, in omapfb_ioctl() argument
1065 struct omapfb_plane_struct *plane = fbi->par; in omapfb_ioctl()
1067 struct fb_ops *ops = fbi->fbops; in omapfb_ioctl()
1087 omapfb_mirror(fbi, p.mirror); in omapfb_ioctl()
1090 omapfb_sync(fbi); in omapfb_ioctl()
1117 r = omapfb_update_win(fbi, u); in omapfb_ioctl()
1125 r = omapfb_update_win(fbi, &p.update_window); in omapfb_ioctl()
1132 r = omapfb_setup_plane(fbi, &p.plane_info); in omapfb_ioctl()
1135 if ((r = omapfb_query_plane(fbi, &p.plane_info)) < 0) in omapfb_ioctl()
1146 r = omapfb_setup_mem(fbi, &p.mem_info); in omapfb_ioctl()
1149 if ((r = omapfb_query_mem(fbi, &p.mem_info)) < 0) in omapfb_ioctl()
1490 static void fbinfo_cleanup(struct omapfb_device *fbdev, struct fb_info *fbi) in fbinfo_cleanup() argument
1492 fb_dealloc_cmap(&fbi->cmap); in fbinfo_cleanup()
1509 struct fb_info *fbi; in planes_init() local
1515 fbi = framebuffer_alloc(sizeof(struct omapfb_plane_struct), in planes_init()
1517 if (fbi == NULL) { in planes_init()
1523 plane = fbi->par; in planes_init()
1527 fbdev->fb_info[i] = fbi; in planes_init()
1529 if ((r = fbinfo_init(fbdev, fbi)) < 0) { in planes_init()
1530 framebuffer_release(fbi); in planes_init()
1534 plane->info.out_width = fbi->var.xres; in planes_init()
1535 plane->info.out_height = fbi->var.yres; in planes_init()