aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/viafbdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/via/viafbdev.c')
-rw-r--r--drivers/video/via/viafbdev.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index 9d9bb9b4ed3f..eace9a4257f4 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -37,6 +37,8 @@ static char *viafb_mode1;
37static int viafb_bpp = 32; 37static int viafb_bpp = 32;
38static int viafb_bpp1 = 32; 38static int viafb_bpp1 = 32;
39 39
40static unsigned int viafb_second_xres = 640;
41static unsigned int viafb_second_yres = 480;
40static unsigned int viafb_second_offset; 42static unsigned int viafb_second_offset;
41static int viafb_second_size; 43static int viafb_second_size;
42 44
@@ -440,8 +442,8 @@ static int viafb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
440 if (viafb_SAMM_ON == 1) { 442 if (viafb_SAMM_ON == 1) {
441 u.viamode.xres_sec = viafb_second_xres; 443 u.viamode.xres_sec = viafb_second_xres;
442 u.viamode.yres_sec = viafb_second_yres; 444 u.viamode.yres_sec = viafb_second_yres;
443 u.viamode.virtual_xres_sec = viafb_second_virtual_xres; 445 u.viamode.virtual_xres_sec = viafb_dual_fb ? viafbinfo1->var.xres_virtual : viafbinfo->var.xres_virtual;
444 u.viamode.virtual_yres_sec = viafb_second_virtual_yres; 446 u.viamode.virtual_yres_sec = viafb_dual_fb ? viafbinfo1->var.yres_virtual : viafbinfo->var.yres_virtual;
445 u.viamode.refresh_sec = viafb_refresh1; 447 u.viamode.refresh_sec = viafb_refresh1;
446 u.viamode.bpp_sec = viafb_bpp1; 448 u.viamode.bpp_sec = viafb_bpp1;
447 } else { 449 } else {
@@ -930,10 +932,8 @@ static int get_primary_device(void)
930 /* Rule: device on iga1 path are the primary device. */ 932 /* Rule: device on iga1 path are the primary device. */
931 if (viafb_SAMM_ON) { 933 if (viafb_SAMM_ON) {
932 if (viafb_CRT_ON) { 934 if (viafb_CRT_ON) {
933 if (viaparinfo->crt_setting_info->iga_path == IGA1) { 935 if (viaparinfo->shared->iga1_devices & VIA_CRT) {
934 DEBUG_MSG(KERN_INFO "CRT IGA Path:%d\n", 936 DEBUG_MSG(KERN_INFO "CRT IGA Path:%d\n", IGA1);
935 viaparinfo->
936 crt_setting_info->iga_path);
937 primary_device = CRT_Device; 937 primary_device = CRT_Device;
938 } 938 }
939 } 939 }
@@ -1746,7 +1746,6 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev)
1746 viaparinfo->lvds_setting_info = &viaparinfo->shared->lvds_setting_info; 1746 viaparinfo->lvds_setting_info = &viaparinfo->shared->lvds_setting_info;
1747 viaparinfo->lvds_setting_info2 = 1747 viaparinfo->lvds_setting_info2 =
1748 &viaparinfo->shared->lvds_setting_info2; 1748 &viaparinfo->shared->lvds_setting_info2;
1749 viaparinfo->crt_setting_info = &viaparinfo->shared->crt_setting_info;
1750 viaparinfo->chip_info = &viaparinfo->shared->chip_info; 1749 viaparinfo->chip_info = &viaparinfo->shared->chip_info;
1751 1750
1752 if (viafb_dual_fb) 1751 if (viafb_dual_fb)
@@ -1793,14 +1792,10 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev)
1793 1792
1794 parse_mode(viafb_mode, &default_xres, &default_yres); 1793 parse_mode(viafb_mode, &default_xres, &default_yres);
1795 vmode_entry = viafb_get_mode(default_xres, default_yres); 1794 vmode_entry = viafb_get_mode(default_xres, default_yres);
1796 if (viafb_SAMM_ON == 1) { 1795 if (viafb_SAMM_ON == 1)
1797 parse_mode(viafb_mode1, &viafb_second_xres, 1796 parse_mode(viafb_mode1, &viafb_second_xres,
1798 &viafb_second_yres); 1797 &viafb_second_yres);
1799 1798
1800 viafb_second_virtual_xres = viafb_second_xres;
1801 viafb_second_virtual_yres = viafb_second_yres;
1802 }
1803
1804 default_var.xres = default_xres; 1799 default_var.xres = default_xres;
1805 default_var.yres = default_yres; 1800 default_var.yres = default_yres;
1806 default_var.xres_virtual = default_xres; 1801 default_var.xres_virtual = default_xres;
@@ -1844,8 +1839,8 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev)
1844 1839
1845 default_var.xres = viafb_second_xres; 1840 default_var.xres = viafb_second_xres;
1846 default_var.yres = viafb_second_yres; 1841 default_var.yres = viafb_second_yres;
1847 default_var.xres_virtual = viafb_second_virtual_xres; 1842 default_var.xres_virtual = viafb_second_xres;
1848 default_var.yres_virtual = viafb_second_virtual_yres; 1843 default_var.yres_virtual = viafb_second_yres;
1849 default_var.bits_per_pixel = viafb_bpp1; 1844 default_var.bits_per_pixel = viafb_bpp1;
1850 viafb_fill_var_timing_info(&default_var, viafb_get_refresh( 1845 viafb_fill_var_timing_info(&default_var, viafb_get_refresh(
1851 default_var.xres, default_var.yres, viafb_refresh1), 1846 default_var.xres, default_var.yres, viafb_refresh1),