Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271342
b: refs/heads/master
c: 4fbf4bf
h: refs/heads/master
v: v3
  • Loading branch information
Florian Tobias Schandinat authored and Florian Tobias Schandinat committed Aug 7, 2011
1 parent d407163 commit 274fb53
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 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: ebb29fb47e198787b8b47a74cb10334cd9647a9d
refs/heads/master: 4fbf4bfe6fb5460bfd4a18ca7c7f21ffec941b07
48 changes: 28 additions & 20 deletions trunk/drivers/video/via/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1769,24 +1769,9 @@ static u8 get_sync(struct fb_info *info)
return polarity;
}

int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
struct VideoModeTable *vmode_tbl1, int video_bpp1)
static void hw_init(void)
{
int i, j;
int port;
u32 devices = viaparinfo->shared->iga1_devices
| viaparinfo->shared->iga2_devices;
u8 value, index, mask;
struct crt_mode_table *crt_timing;
struct crt_mode_table *crt_timing1 = NULL;
struct fb_var_screeninfo var2;

device_screen_off();
crt_timing = vmode_tbl->crtc;

if (viafb_SAMM_ON == 1) {
crt_timing1 = vmode_tbl1->crtc;
}
int i;

inb(VIAStatus);
outb(0x00, VIAAR);
Expand Down Expand Up @@ -1825,9 +1810,8 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
break;
}

/* probably this should go to the scaling code one day */
viafb_write_regx(scaling_parameters, ARRAY_SIZE(scaling_parameters));
device_off();
via_set_state(devices, VIA_STATE_OFF);

/* Fill VPIT Parameters */
/* Write Misc Register */
Expand All @@ -1853,6 +1837,31 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
inb(VIAStatus);
outb(0x20, VIAAR);

load_fix_bit_crtc_reg();
}

int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
struct VideoModeTable *vmode_tbl1, int video_bpp1)
{
int j;
int port;
u32 devices = viaparinfo->shared->iga1_devices
| viaparinfo->shared->iga2_devices;
u8 value, index, mask;
struct crt_mode_table *crt_timing;
struct crt_mode_table *crt_timing1 = NULL;
struct fb_var_screeninfo var2;

device_screen_off();
crt_timing = vmode_tbl->crtc;
if (viafb_SAMM_ON == 1)
crt_timing1 = vmode_tbl1->crtc;

device_off();
via_set_state(devices, VIA_STATE_OFF);

hw_init();

/* Update Patch Register */

if ((viaparinfo->chip_info->gfx_chip_name == UNICHROME_CLE266
Expand All @@ -1868,7 +1877,6 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
}
}

load_fix_bit_crtc_reg();
via_set_primary_pitch(viafbinfo->fix.line_length);
via_set_secondary_pitch(viafb_dual_fb ? viafbinfo1->fix.line_length
: viafbinfo->fix.line_length);
Expand Down

0 comments on commit 274fb53

Please sign in to comment.