Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271192
b: refs/heads/master
c: a35a9b7
h: refs/heads/master
v: v3
  • Loading branch information
Laurent Pinchart committed Aug 19, 2011
1 parent 147a83c commit 22ac5d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 2970840c034838d717126fbec0b38029c7f04852
refs/heads/master: a35a9b79dd44b36b688c493610dfbbdb42aff136
9 changes: 5 additions & 4 deletions trunk/drivers/video/arkfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,13 +908,14 @@ static int arkfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info
unsigned int offset;

/* Calculate the offset */
if (var->bits_per_pixel == 0) {
offset = (var->yoffset / 16) * (var->xres_virtual / 2) + (var->xoffset / 2);
if (info->var.bits_per_pixel == 0) {
offset = (var->yoffset / 16) * (info->var.xres_virtual / 2)
+ (var->xoffset / 2);
offset = offset >> 2;
} else {
offset = (var->yoffset * info->fix.line_length) +
(var->xoffset * var->bits_per_pixel / 8);
offset = offset >> ((var->bits_per_pixel == 4) ? 2 : 3);
(var->xoffset * info->var.bits_per_pixel / 8);
offset = offset >> ((info->var.bits_per_pixel == 4) ? 2 : 3);
}

/* Set the offset */
Expand Down

0 comments on commit 22ac5d4

Please sign in to comment.