Skip to content

Commit

Permalink
viafb: set correct polarity for second adapter
Browse files Browse the repository at this point in the history
This patch sets the correct polarity for the second adapter when
viafb_SAMM_ON is set and viafb_dual_fb is not set. Just one step to
make this mode useful.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
  • Loading branch information
Florian Tobias Schandinat authored and Florian Tobias Schandinat committed Feb 10, 2012
1 parent d65b4e9 commit e0e12a9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/video/via/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1758,13 +1758,13 @@ static void set_display_channel(void)
}
}

static u8 get_sync(struct fb_info *info)
static u8 get_sync(struct fb_var_screeninfo *var)
{
u8 polarity = 0;

if (!(info->var.sync & FB_SYNC_HOR_HIGH_ACT))
if (!(var->sync & FB_SYNC_HOR_HIGH_ACT))
polarity |= VIA_HSYNC_NEGATIVE;
if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT))
if (!(var->sync & FB_SYNC_VERT_HIGH_ACT))
polarity |= VIA_VSYNC_NEGATIVE;
return polarity;
}
Expand Down Expand Up @@ -1976,13 +1976,13 @@ int viafb_setmode(int video_bpp, int video_bpp1)
viafb_DeviceStatus = CRT_Device;
}
device_on();
if (!viafb_dual_fb)
via_set_sync_polarity(devices, get_sync(viafbinfo));
if (!viafb_SAMM_ON)
via_set_sync_polarity(devices, get_sync(&viafbinfo->var));
else {
via_set_sync_polarity(viaparinfo->shared->iga1_devices,
get_sync(viafbinfo));
get_sync(&viafbinfo->var));
via_set_sync_polarity(viaparinfo->shared->iga2_devices,
get_sync(viafbinfo1));
get_sync(&var2));
}

clock.set_engine_pll_state(VIA_STATE_ON);
Expand Down

0 comments on commit e0e12a9

Please sign in to comment.