Skip to content

Commit

Permalink
[PATCH] tgafb: sync-on-green support fixes
Browse files Browse the repository at this point in the history
This sets up the deep register of the TGA ASIC as well as the blank pedestal
of the Bt463 RAMDAC correctly for the sync-on-green mode.

Signed-off-by: Maciej W. Rozycki <[email protected]>
Cc: James Simmons <[email protected]>
Cc: "Antonino A. Daplas" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Maciej W. Rozycki authored and Linus Torvalds committed Feb 12, 2007
1 parent 1b2f2fe commit a524d94
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/video/tgafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ tgafb_set_par(struct fb_info *info)
while (TGA_READ_REG(par, TGA_CMD_STAT_REG) & 1) /* wait for not busy */
continue;
mb();
TGA_WRITE_REG(par, deep_presets[tga_type], TGA_DEEP_REG);
TGA_WRITE_REG(par, deep_presets[tga_type] |
(par->sync_on_green ? 0x0 : 0x00010000),
TGA_DEEP_REG);
while (TGA_READ_REG(par, TGA_CMD_STAT_REG) & 1) /* wait for not busy */
continue;
mb();
Expand Down Expand Up @@ -261,11 +263,11 @@ tgafb_set_par(struct fb_info *info)

} else { /* 24-plane or 24plusZ */

/* Init BT463 registers. */
/* Init BT463 RAMDAC registers. */
BT463_WRITE(par, BT463_REG_ACC, BT463_CMD_REG_0, 0x40);
BT463_WRITE(par, BT463_REG_ACC, BT463_CMD_REG_1, 0x08);
BT463_WRITE(par, BT463_REG_ACC, BT463_CMD_REG_2,
(par->sync_on_green ? 0x80 : 0x40));
(par->sync_on_green ? 0xc0 : 0x40));

BT463_WRITE(par, BT463_REG_ACC, BT463_READ_MASK_0, 0xff);
BT463_WRITE(par, BT463_REG_ACC, BT463_READ_MASK_1, 0xff);
Expand Down

0 comments on commit a524d94

Please sign in to comment.