Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271306
b: refs/heads/master
c: dc1d5ad
h: refs/heads/master
v: v3
  • Loading branch information
Laurent Pinchart authored and Florian Tobias Schandinat committed Sep 5, 2011
1 parent 32a9952 commit 289a8ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 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: ed5bebf29e82beab3456901e26a495ae0a49ebad
refs/heads/master: dc1d5adab5cc57eb732407d80c9e7ae48891ffca
24 changes: 12 additions & 12 deletions trunk/drivers/video/sh_mobile_lcdcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,12 +877,12 @@ static int sh_mobile_fb_pan_display(struct fb_var_screeninfo *var,
unsigned long base_addr_y, base_addr_c;
unsigned long c_offset;

if (!var->nonstd)
new_pan_offset = (var->yoffset * info->fix.line_length) +
(var->xoffset * (info->var.bits_per_pixel / 8));
if (!info->var.nonstd)
new_pan_offset = var->yoffset * info->fix.line_length
+ var->xoffset * (info->var.bits_per_pixel / 8);
else
new_pan_offset = (var->yoffset * info->fix.line_length) +
(var->xoffset);
new_pan_offset = var->yoffset * info->fix.line_length
+ var->xoffset;

if (new_pan_offset == ch->pan_offset)
return 0; /* No change, do nothing */
Expand All @@ -891,13 +891,13 @@ static int sh_mobile_fb_pan_display(struct fb_var_screeninfo *var,

/* Set the source address for the next refresh */
base_addr_y = ch->dma_handle + new_pan_offset;
if (var->nonstd) {
if (info->var.nonstd) {
/* Set y offset */
c_offset = (var->yoffset *
info->fix.line_length *
(info->var.bits_per_pixel - 8)) / 8;
base_addr_c = ch->dma_handle + var->xres * var->yres_virtual +
c_offset;
c_offset = var->yoffset * info->fix.line_length
* (info->var.bits_per_pixel - 8) / 8;
base_addr_c = ch->dma_handle
+ info->var.xres * info->var.yres_virtual
+ c_offset;
/* Set x offset */
if (info->var.bits_per_pixel == 24)
base_addr_c += 2 * var->xoffset;
Expand All @@ -923,7 +923,7 @@ static int sh_mobile_fb_pan_display(struct fb_var_screeninfo *var,
ch->base_addr_c = base_addr_c;

lcdc_write_chan_mirror(ch, LDSA1R, base_addr_y);
if (var->nonstd)
if (info->var.nonstd)
lcdc_write_chan_mirror(ch, LDSA2R, base_addr_c);

if (lcdc_chan_is_sublcd(ch))
Expand Down

0 comments on commit 289a8ef

Please sign in to comment.