kernels/linux-2.4.0/drivers/video/sis/sis_main.c
/*
 *    Set the User Defined Part of the Display
 */
Set the User Defined Part of the Display
Set the User Defined Part of the Display
static int sisfb_set_var(struct fb_var_screeninfo *var, int con,
			 struct fb_info *info)
{
	int err;
	unsigned int cols, rows;
	fb_display[con].var.activate = FB_ACTIVATE_NOW;
	if (do_set_var(var, con == currcon, info)) {
		crtc_to_var(var);	
		return -EINVAL;
	}
	crtc_to_var(var);
	sisfb_set_disp(con, var);
	if (info->changevar)
		(*info->changevar) (con);
	if ((err = fb_alloc_cmap(&fb_display[con].cmap, 0, 0)))
		return err;
	do_install_cmap(con, info);
	cols = sisbios_mode[mode_idx].cols;
	rows = sisbios_mode[mode_idx].rows;
	vc_resize_con(rows, cols, fb_display[con].conp->vc_num);
	return 0;
}
static int sisfb_set_var ( struct fb_var_screeninfo * var , int con , struct fb_info * info ) { int err ; unsigned int cols , rows ; fb_display [ con ] . var . activate = FB_ACTIVATE_NOW ; if ( do_set_var ( var , con == currcon , info ) ) { crtc_to_var ( var ) ; return - EINVAL ; } crtc_to_var ( var ) ; sisfb_set_disp ( con , var ) ; if ( info -> changevar ) ( * info -> changevar ) ( con ) ; if ( ( err = fb_alloc_cmap ( & fb_display [ con ] . cmap , 0 , 0 ) ) ) return err ; do_install_cmap ( con , info ) ; cols = sisbios_mode [ mode_idx ] . cols ; rows = sisbios_mode [ mode_idx ] . rows ; vc_resize_con ( rows , cols , fb_display [ con ] . conp -> vc_num ) ; return 0 ; }
Set the User Defined Part of the Display
Set the User Defined Part of the Display
/* Set mode */ /* return current mode to user */ /* get actual setting value */ /* update display of current console */ /* inform console to update struct display */