Lines Matching refs:mode
548 const struct fb_videomode *mode, unsigned int bpp) in fb_try_mode() argument
553 mode->name ? mode->name : "noname", in fb_try_mode()
554 mode->xres, mode->yres, bpp, mode->refresh); in fb_try_mode()
555 var->xres = mode->xres; in fb_try_mode()
556 var->yres = mode->yres; in fb_try_mode()
557 var->xres_virtual = mode->xres; in fb_try_mode()
558 var->yres_virtual = mode->yres; in fb_try_mode()
563 var->pixclock = mode->pixclock; in fb_try_mode()
564 var->left_margin = mode->left_margin; in fb_try_mode()
565 var->right_margin = mode->right_margin; in fb_try_mode()
566 var->upper_margin = mode->upper_margin; in fb_try_mode()
567 var->lower_margin = mode->lower_margin; in fb_try_mode()
568 var->hsync_len = mode->hsync_len; in fb_try_mode()
569 var->vsync_len = mode->vsync_len; in fb_try_mode()
570 var->sync = mode->sync; in fb_try_mode()
571 var->vmode = mode->vmode; in fb_try_mode()
851 void fb_var_to_videomode(struct fb_videomode *mode, in fb_var_to_videomode() argument
856 mode->name = NULL; in fb_var_to_videomode()
857 mode->xres = var->xres; in fb_var_to_videomode()
858 mode->yres = var->yres; in fb_var_to_videomode()
859 mode->pixclock = var->pixclock; in fb_var_to_videomode()
860 mode->hsync_len = var->hsync_len; in fb_var_to_videomode()
861 mode->vsync_len = var->vsync_len; in fb_var_to_videomode()
862 mode->left_margin = var->left_margin; in fb_var_to_videomode()
863 mode->right_margin = var->right_margin; in fb_var_to_videomode()
864 mode->upper_margin = var->upper_margin; in fb_var_to_videomode()
865 mode->lower_margin = var->lower_margin; in fb_var_to_videomode()
866 mode->sync = var->sync; in fb_var_to_videomode()
867 mode->vmode = var->vmode & FB_VMODE_MASK; in fb_var_to_videomode()
868 mode->flag = FB_MODE_IS_FROM_VAR; in fb_var_to_videomode()
869 mode->refresh = 0; in fb_var_to_videomode()
890 mode->refresh = hfreq/vtotal; in fb_var_to_videomode()
899 const struct fb_videomode *mode) in fb_videomode_to_var() argument
901 var->xres = mode->xres; in fb_videomode_to_var()
902 var->yres = mode->yres; in fb_videomode_to_var()
903 var->xres_virtual = mode->xres; in fb_videomode_to_var()
904 var->yres_virtual = mode->yres; in fb_videomode_to_var()
907 var->pixclock = mode->pixclock; in fb_videomode_to_var()
908 var->left_margin = mode->left_margin; in fb_videomode_to_var()
909 var->right_margin = mode->right_margin; in fb_videomode_to_var()
910 var->upper_margin = mode->upper_margin; in fb_videomode_to_var()
911 var->lower_margin = mode->lower_margin; in fb_videomode_to_var()
912 var->hsync_len = mode->hsync_len; in fb_videomode_to_var()
913 var->vsync_len = mode->vsync_len; in fb_videomode_to_var()
914 var->sync = mode->sync; in fb_videomode_to_var()
915 var->vmode = mode->vmode & FB_VMODE_MASK; in fb_videomode_to_var()
964 struct fb_videomode *mode, *best = NULL; in fb_find_best_mode() local
971 mode = &modelist->mode; in fb_find_best_mode()
973 if (mode->xres >= var->xres && mode->yres >= var->yres) { in fb_find_best_mode()
974 d = (mode->xres - var->xres) + in fb_find_best_mode()
975 (mode->yres - var->yres); in fb_find_best_mode()
978 best = mode; in fb_find_best_mode()
980 mode->refresh > best->refresh) in fb_find_best_mode()
981 best = mode; in fb_find_best_mode()
997 const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode, in fb_find_nearest_mode() argument
1009 cmode = &modelist->mode; in fb_find_nearest_mode()
1011 d = abs(cmode->xres - mode->xres) + in fb_find_nearest_mode()
1012 abs(cmode->yres - mode->yres); in fb_find_nearest_mode()
1015 diff_refresh = abs(cmode->refresh - mode->refresh); in fb_find_nearest_mode()
1018 d = abs(cmode->refresh - mode->refresh); in fb_find_nearest_mode()
1042 struct fb_videomode *m, mode; in fb_match_mode() local
1044 fb_var_to_videomode(&mode, var); in fb_match_mode()
1047 m = &modelist->mode; in fb_match_mode()
1048 if (fb_mode_is_equal(m, &mode)) in fb_match_mode()
1062 int fb_add_videomode(const struct fb_videomode *mode, struct list_head *head) in fb_add_videomode() argument
1071 m = &modelist->mode; in fb_add_videomode()
1072 if (fb_mode_is_equal(m, mode)) { in fb_add_videomode()
1083 modelist->mode = *mode; in fb_add_videomode()
1097 void fb_delete_videomode(const struct fb_videomode *mode, in fb_delete_videomode() argument
1106 m = &modelist->mode; in fb_delete_videomode()
1107 if (fb_mode_is_equal(m, mode)) { in fb_delete_videomode()
1162 m = &modelist->mode; in fb_find_best_display()