Lines Matching refs:mode
489 const struct fb_videomode *mode, unsigned int bpp) in fb_try_mode() argument
494 mode->name ? mode->name : "noname", in fb_try_mode()
495 mode->xres, mode->yres, bpp, mode->refresh); in fb_try_mode()
496 var->xres = mode->xres; in fb_try_mode()
497 var->yres = mode->yres; in fb_try_mode()
498 var->xres_virtual = mode->xres; in fb_try_mode()
499 var->yres_virtual = mode->yres; in fb_try_mode()
504 var->pixclock = mode->pixclock; in fb_try_mode()
505 var->left_margin = mode->left_margin; in fb_try_mode()
506 var->right_margin = mode->right_margin; in fb_try_mode()
507 var->upper_margin = mode->upper_margin; in fb_try_mode()
508 var->lower_margin = mode->lower_margin; in fb_try_mode()
509 var->hsync_len = mode->hsync_len; in fb_try_mode()
510 var->vsync_len = mode->vsync_len; in fb_try_mode()
511 var->sync = mode->sync; in fb_try_mode()
512 var->vmode = mode->vmode; in fb_try_mode()
771 void fb_var_to_videomode(struct fb_videomode *mode, in fb_var_to_videomode() argument
776 mode->name = NULL; in fb_var_to_videomode()
777 mode->xres = var->xres; in fb_var_to_videomode()
778 mode->yres = var->yres; in fb_var_to_videomode()
779 mode->pixclock = var->pixclock; in fb_var_to_videomode()
780 mode->hsync_len = var->hsync_len; in fb_var_to_videomode()
781 mode->vsync_len = var->vsync_len; in fb_var_to_videomode()
782 mode->left_margin = var->left_margin; in fb_var_to_videomode()
783 mode->right_margin = var->right_margin; in fb_var_to_videomode()
784 mode->upper_margin = var->upper_margin; in fb_var_to_videomode()
785 mode->lower_margin = var->lower_margin; in fb_var_to_videomode()
786 mode->sync = var->sync; in fb_var_to_videomode()
787 mode->vmode = var->vmode & FB_VMODE_MASK; in fb_var_to_videomode()
788 mode->flag = FB_MODE_IS_FROM_VAR; in fb_var_to_videomode()
789 mode->refresh = 0; in fb_var_to_videomode()
807 mode->refresh = hfreq/vtotal; in fb_var_to_videomode()
816 const struct fb_videomode *mode) in fb_videomode_to_var() argument
818 var->xres = mode->xres; in fb_videomode_to_var()
819 var->yres = mode->yres; in fb_videomode_to_var()
820 var->xres_virtual = mode->xres; in fb_videomode_to_var()
821 var->yres_virtual = mode->yres; in fb_videomode_to_var()
824 var->pixclock = mode->pixclock; in fb_videomode_to_var()
825 var->left_margin = mode->left_margin; in fb_videomode_to_var()
826 var->right_margin = mode->right_margin; in fb_videomode_to_var()
827 var->upper_margin = mode->upper_margin; in fb_videomode_to_var()
828 var->lower_margin = mode->lower_margin; in fb_videomode_to_var()
829 var->hsync_len = mode->hsync_len; in fb_videomode_to_var()
830 var->vsync_len = mode->vsync_len; in fb_videomode_to_var()
831 var->sync = mode->sync; in fb_videomode_to_var()
832 var->vmode = mode->vmode & FB_VMODE_MASK; in fb_videomode_to_var()
881 struct fb_videomode *mode, *best = NULL; in fb_find_best_mode() local
888 mode = &modelist->mode; in fb_find_best_mode()
890 if (mode->xres >= var->xres && mode->yres >= var->yres) { in fb_find_best_mode()
891 d = (mode->xres - var->xres) + in fb_find_best_mode()
892 (mode->yres - var->yres); in fb_find_best_mode()
895 best = mode; in fb_find_best_mode()
897 mode->refresh > best->refresh) in fb_find_best_mode()
898 best = mode; in fb_find_best_mode()
914 const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode, in fb_find_nearest_mode() argument
926 cmode = &modelist->mode; in fb_find_nearest_mode()
928 d = abs(cmode->xres - mode->xres) + in fb_find_nearest_mode()
929 abs(cmode->yres - mode->yres); in fb_find_nearest_mode()
932 diff_refresh = abs(cmode->refresh - mode->refresh); in fb_find_nearest_mode()
935 d = abs(cmode->refresh - mode->refresh); in fb_find_nearest_mode()
959 struct fb_videomode *m, mode; in fb_match_mode() local
961 fb_var_to_videomode(&mode, var); in fb_match_mode()
964 m = &modelist->mode; in fb_match_mode()
965 if (fb_mode_is_equal(m, &mode)) in fb_match_mode()
979 int fb_add_videomode(const struct fb_videomode *mode, struct list_head *head) in fb_add_videomode() argument
988 m = &modelist->mode; in fb_add_videomode()
989 if (fb_mode_is_equal(m, mode)) { in fb_add_videomode()
1000 modelist->mode = *mode; in fb_add_videomode()
1014 void fb_delete_videomode(const struct fb_videomode *mode, in fb_delete_videomode() argument
1023 m = &modelist->mode; in fb_delete_videomode()
1024 if (fb_mode_is_equal(m, mode)) { in fb_delete_videomode()
1079 m = &modelist->mode; in fb_find_best_display()