kernels/linux-2.4.0/drivers/video/fbgen.c
/*
     *  Pan or Wrap the Display
     *
     *  This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
     */
Pan or Wrap the Display
This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
Pan or Wrap the Display This call looks only at xoffset yoffset and the FB_VMODE_YWRAP flag
int fbgen_pan_display(struct fb_var_screeninfo *var, int con,
		      struct fb_info *info)
{
    struct fb_info_gen *info2 = (struct fb_info_gen *)info;
    struct fbgen_hwswitch *fbhw = info2->fbhw;
    int xoffset = var->xoffset;
    int yoffset = var->yoffset;
    int err;
    if (xoffset < 0 ||
	xoffset+fb_display[con].var.xres > fb_display[con].var.xres_virtual ||
	yoffset < 0 ||
	yoffset+fb_display[con].var.yres > fb_display[con].var.yres_virtual)
	return -EINVAL;
    if (con == currcon) {
	if (fbhw->pan_display) {
	    if ((err = fbhw->pan_display(var, info2)))
		return err;
	} else
	    return -EINVAL;
    }
    fb_display[con].var.xoffset = var->xoffset;
    fb_display[con].var.yoffset = var->yoffset;
    if (var->vmode & FB_VMODE_YWRAP)
	fb_display[con].var.vmode |= FB_VMODE_YWRAP;
    else
	fb_display[con].var.vmode &= ~FB_VMODE_YWRAP;
    return 0;
}
int fbgen_pan_display ( struct fb_var_screeninfo * var , int con , struct fb_info * info ) { struct fb_info_gen * info2 = ( struct fb_info_gen * ) info ; struct fbgen_hwswitch * fbhw = info2 -> fbhw ; int xoffset = var -> xoffset ; int yoffset = var -> yoffset ; int err ; if ( xoffset < 0 || xoffset + fb_display [ con ] . var . xres > fb_display [ con ] . var . xres_virtual || yoffset < 0 || yoffset + fb_display [ con ] . var . yres > fb_display [ con ] . var . yres_virtual ) return - EINVAL ; if ( con == currcon ) { if ( fbhw -> pan_display ) { if ( ( err = fbhw -> pan_display ( var , info2 ) ) ) return err ; } else return - EINVAL ; } fb_display [ con ] . var . xoffset = var -> xoffset ; fb_display [ con ] . var . yoffset = var -> yoffset ; if ( var -> vmode & FB_VMODE_YWRAP ) fb_display [ con ] . var . vmode |= FB_VMODE_YWRAP ; else fb_display [ con ] . var . vmode &= ~ FB_VMODE_YWRAP ; return 0 ; }
Pan or Wrap the Display
  This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
Pan or Wrap the Display This call looks only at xoffset yoffset and the FB_VMODE_YWRAP flag