Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139248
b: refs/heads/master
c: 6683e01
h: refs/heads/master
v: v3
  • Loading branch information
Krzysztof Helt authored and Linus Torvalds committed Apr 1, 2009
1 parent bb54a53 commit fc19bfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: 6e30fc086d000d15abfe5550cc8b286335f7e132
refs/heads/master: 6683e01e2c950f635a6c0e2bbc80db1b1838311f
14 changes: 6 additions & 8 deletions trunk/drivers/video/cirrusfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,8 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
struct cirrusfb_regs regs;
u8 __iomem *regbase = cinfo->regbase;
unsigned char tmp;
int offset = 0, err;
int err;
int pitch;
const struct cirrusfb_board_info_rec *bi;
int hdispend, hsyncstart, hsyncend, htotal;
int yres, vdispend, vsyncstart, vsyncend, vtotal;
Expand Down Expand Up @@ -1027,7 +1028,6 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
vga_wseq(regbase, VGA_SEQ_MEMORY_MODE, 0x06);
/* plane mask: only write to first plane */
vga_wseq(regbase, VGA_SEQ_PLANE_WRITE, 0x01);
offset = var->xres_virtual / 16;
}

/******************************************************
Expand Down Expand Up @@ -1113,7 +1113,6 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
vga_wseq(regbase, VGA_SEQ_MEMORY_MODE, 0x0a);
/* plane mask: enable writing to all 4 planes */
vga_wseq(regbase, VGA_SEQ_PLANE_WRITE, 0xff);
offset = var->xres_virtual / 8;
}

/******************************************************
Expand Down Expand Up @@ -1190,7 +1189,6 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
vga_wseq(regbase, VGA_SEQ_MEMORY_MODE, 0x0a);
/* plane mask: enable writing to all 4 planes */
vga_wseq(regbase, VGA_SEQ_PLANE_WRITE, 0xff);
offset = var->xres_virtual / 4;
}

/******************************************************
Expand Down Expand Up @@ -1263,7 +1261,6 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
vga_wseq(regbase, VGA_SEQ_MEMORY_MODE, 0x0a);
/* plane mask: enable writing to all 4 planes */
vga_wseq(regbase, VGA_SEQ_PLANE_WRITE, 0xff);
offset = var->xres_virtual / 4;
}

/******************************************************
Expand All @@ -1277,17 +1274,18 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
"What's this? requested color depth == %d.\n",
var->bits_per_pixel);

vga_wcrt(regbase, VGA_CRTC_OFFSET, offset & 0xff);
pitch = info->fix.line_length >> 3;
vga_wcrt(regbase, VGA_CRTC_OFFSET, pitch & 0xff);
tmp = 0x22;
if (offset & 0x100)
if (pitch & 0x100)
tmp |= 0x10; /* offset overflow bit */

/* screen start addr #16-18, fastpagemode cycles */
vga_wcrt(regbase, CL_CRT1B, tmp);

/* screen start address bit 19 */
if (cirrusfb_board_info[cinfo->btype].scrn_start_bit19)
vga_wcrt(regbase, CL_CRT1D, 0x00);
vga_wcrt(regbase, CL_CRT1D, (pitch >> 9) & 1);

if (cinfo->btype == BT_LAGUNA ||
cinfo->btype == BT_GD5480) {
Expand Down

0 comments on commit fc19bfc

Please sign in to comment.