if (logo_shown >= 0) goto redraw_down; 
static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,			int count){	struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];	struct display *p = &fb_display[vc->vc_num];	struct fbcon_ops *ops = info->fbcon_par;	int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK;	if (fbcon_is_inactive(vc, info))		return -EINVAL;	fbcon_cursor(vc, CM_ERASE);	/*	 * ++Geert: Only use ywrap/ypan if the console is in text mode	 * ++Andrew: Only use ypan on hardware text mode when scrolling the	 *           whole screen (prevents flicker).	 */	switch (dir) {	case SM_UP:		if (count > vc->vc_rows)	/* Maximum realistic size */			count = vc->vc_rows;		if (softback_top)			fbcon_softback_note(vc, t, count);		if (logo_shown >= 0)			goto redraw_up;		switch (p->scrollmode) {		case SCROLL_MOVE:			ops->bmove(vc, info, t + count, 0, t, 0,				    b - t - count, vc->vc_cols);			ops->clear(vc, info, b - count, 0, count,				  vc->vc_cols);			break;		case SCROLL_WRAP_MOVE:			if (b - t - count > 3 * vc->vc_rows >> 2) {				if (t > 0)					fbcon_bmove(vc, 0, 0, count, 0, t,						    vc->vc_cols);				ywrap_up(vc, count);				if (vc->vc_rows - b > 0)					fbcon_bmove(vc, b - count, 0, b, 0,						    vc->vc_rows - b,						    vc->vc_cols);			} else if (info->flags & FBINFO_READS_FAST)				fbcon_bmove(vc, t + count, 0, t, 0,					    b - t - count, vc->vc_cols);			else				goto redraw_up;			fbcon_clear(vc, b - count, 0, count, vc->vc_cols);			break;		case SCROLL_PAN_REDRAW:			if ((p->yscroll + count <=			     2 * (p->vrows - vc->vc_rows))			    && ((!scroll_partial && (b - t == vc->vc_rows))				|| (scroll_partial				    && (b - t - count >					3 * vc->vc_rows >> 2)))) {				if (t > 0)					fbcon_redraw_move(vc, p, 0, t, count);				ypan_up_redraw(vc, t, count);				if (vc->vc_rows - b > 0)					fbcon_redraw_move(vc, p, b - count,							  vc->vc_rows - b, b);			} else				fbcon_redraw_move(vc, p, t + count, b - t - count, t);			fbcon_clear(vc, b - count, 0, count, vc->vc_cols);			break;		case SCROLL_PAN_MOVE:			if ((p->yscroll + count <=			     2 * (p->vrows - vc->vc_rows))			    && ((!scroll_partial && (b - t == vc->vc_rows))				|| (scroll_partial				    && (b - t - count >					3 * vc->vc_rows >> 2)))) {				if (t > 0)					fbcon_bmove(vc, 0, 0, count, 0, t,						    vc->vc_cols);				ypan_up(vc, count);				if (vc->vc_rows - b > 0)					fbcon_bmove(vc, b - count, 0, b, 0,						    vc->vc_rows - b,						    vc->vc_cols);			} else if (info->flags & FBINFO_READS_FAST)				fbcon_bmove(vc, t + count, 0, t, 0,					    b - t - count, vc->vc_cols);			else				goto redraw_up;			fbcon_clear(vc, b - count, 0, count, vc->vc_cols);			break;		case SCROLL_REDRAW:		      redraw_up:			fbcon_redraw(vc, p, t, b - t - count,				     count * vc->vc_cols);			fbcon_clear(vc, b - count, 0, count, vc->vc_cols);			scr_memsetw((unsigned short *) (vc->vc_origin +							vc->vc_size_row *							(b - count)),				    vc->vc_video_erase_char,				    vc->vc_size_row * count);			return 1;		}		break;	case SM_DOWN:		if (count > vc->vc_rows)	/* Maximum realistic size */			count = vc->vc_rows;		switch (p->scrollmode) {		case SCROLL_MOVE:			ops->bmove(vc, info, t, 0, t + count, 0,				    b - t - count, vc->vc_cols);			ops->clear(vc, info, t, 0, count, vc->vc_cols);			break;		case SCROLL_WRAP_MOVE:			if (b - t - count > 3 * vc->vc_rows >> 2) {				if (vc->vc_rows - b > 0)					fbcon_bmove(vc, b, 0, b - count, 0,						    vc->vc_rows - b,						    vc->vc_cols);				ywrap_down(vc, count);				if (t > 0)					fbcon_bmove(vc, count, 0, 0, 0, t,						    vc->vc_cols);			} else if (info->flags & FBINFO_READS_FAST)				fbcon_bmove(vc, t, 0, t + count, 0,					    b - t - count, vc->vc_cols);			else				goto redraw_down;			fbcon_clear(vc, t, 0, count, vc->vc_cols);			break;		case SCROLL_PAN_MOVE:			if ((count - p->yscroll <= p->vrows - vc->vc_rows)			    && ((!scroll_partial && (b - t == vc->vc_rows))				|| (scroll_partial				    && (b - t - count >					3 * vc->vc_rows >> 2)))) {				if (vc->vc_rows - b > 0)					fbcon_bmove(vc, b, 0, b - count, 0,						    vc->vc_rows - b,						    vc->vc_cols);				ypan_down(vc, count);				if (t > 0)					fbcon_bmove(vc, count, 0, 0, 0, t,						    vc->vc_cols);			} else if (info->flags & FBINFO_READS_FAST)				fbcon_bmove(vc, t, 0, t + count, 0,					    b - t - count, vc->vc_cols);			else				goto redraw_down;			fbcon_clear(vc, t, 0, count, vc->vc_cols);			break;		case SCROLL_PAN_REDRAW:			if ((count - p->yscroll <= p->vrows - vc->vc_rows)			    && ((!scroll_partial && (b - t == vc->vc_rows))				|| (scroll_partial				    && (b - t - count >					3 * vc->vc_rows >> 2)))) {				if (vc->vc_rows - b > 0)					fbcon_redraw_move(vc, p, b, vc->vc_rows - b,							  b - count);				ypan_down_redraw(vc, t, count);				if (t > 0)					fbcon_redraw_move(vc, p, count, t, 0);			} else				fbcon_redraw_move(vc, p, t, b - t - count, t + count);			fbcon_clear(vc, t, 0, count, vc->vc_cols);			break;		case SCROLL_REDRAW:		      redraw_down:			fbcon_redraw(vc, p, b - 1, b - t - count,				     -count * vc->vc_cols);			fbcon_clear(vc, t, 0, count, vc->vc_cols);			scr_memsetw((unsigned short *) (vc->vc_origin +							vc->vc_size_row *							t),				    vc->vc_video_erase_char,				    vc->vc_size_row * count);			return 1;		}	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/e703ecc3bfbe10f478500798c0c5826d00ad9fe3/fbcon.c/clean/drivers/video/console/fbcon.c