Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114826
b: refs/heads/master
c: d15d56f
h: refs/heads/master
v: v3
  • Loading branch information
Krzysztof Helt authored and Linus Torvalds committed Oct 16, 2008
1 parent 660bca8 commit b6f5162
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 319fcb224d66a4702731ec13b8ac670ad1e923bf
refs/heads/master: d15d56f9f10295a992cc7a7697d6fd8b01823cfc
35 changes: 5 additions & 30 deletions trunk/drivers/video/neofb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,8 +1186,11 @@ static int neofb_set_par(struct fb_info *info)
return 0;
}

static void neofb_update_start(struct fb_info *info,
struct fb_var_screeninfo *var)
/*
* Pan or Wrap the Display
*/
static int neofb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{
struct neofb_par *par = info->par;
struct vgastate *state = &par->state;
Expand Down Expand Up @@ -1216,35 +1219,7 @@ static void neofb_update_start(struct fb_info *info,
vga_wgfx(state->vgabase, 0x0E, (((Base >> 16) & 0x0f) | (oldExtCRTDispAddr & 0xf0)));

neoLock(state);
}

/*
* Pan or Wrap the Display
*/
static int neofb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{
u_int y_bottom;

y_bottom = var->yoffset;

if (!(var->vmode & FB_VMODE_YWRAP))
y_bottom += var->yres;

if (var->xoffset > (var->xres_virtual - var->xres))
return -EINVAL;
if (y_bottom > info->var.yres_virtual)
return -EINVAL;

neofb_update_start(info, var);

info->var.xoffset = var->xoffset;
info->var.yoffset = var->yoffset;

if (var->vmode & FB_VMODE_YWRAP)
info->var.vmode |= FB_VMODE_YWRAP;
else
info->var.vmode &= ~FB_VMODE_YWRAP;
return 0;
}

Expand Down

0 comments on commit b6f5162

Please sign in to comment.