aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-03-20 21:46:24 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-03-21 17:47:22 -0400
commit0523656eed6941a1a0e6b8de36ca73f44d2142c0 (patch)
tree48f44dcb400c515dcc1aea0f6c9d03845aff8131 /drivers/video
parent486d4c08dd2eb29b26b4a27f8056155a7a639861 (diff)
viafb: kill crt_setting_information
As the iga path is the only remaining information which is also handled by the active devices there is no reason to keep it. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/via/chip.h4
-rw-r--r--drivers/video/via/hw.c28
-rw-r--r--drivers/video/via/viafbdev.c7
-rw-r--r--drivers/video/via/viafbdev.h2
4 files changed, 15 insertions, 26 deletions
diff --git a/drivers/video/via/chip.h b/drivers/video/via/chip.h
index 29d70244a21..1aa0fb3c343 100644
--- a/drivers/video/via/chip.h
+++ b/drivers/video/via/chip.h
@@ -137,10 +137,6 @@ struct chip_information {
137 struct lvds_chip_information lvds_chip_info2; 137 struct lvds_chip_information lvds_chip_info2;
138}; 138};
139 139
140struct crt_setting_information {
141 int iga_path;
142};
143
144struct tmds_setting_information { 140struct tmds_setting_information {
145 int iga_path; 141 int iga_path;
146 int h_active; 142 int h_active;
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index c4d2136ae33..0098270ac42 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -770,13 +770,14 @@ static u32 get_lcd_devices(int output_interface)
770/*Set IGA path for each device*/ 770/*Set IGA path for each device*/
771void viafb_set_iga_path(void) 771void viafb_set_iga_path(void)
772{ 772{
773 int crt_iga_path = 0;
773 774
774 if (viafb_SAMM_ON == 1) { 775 if (viafb_SAMM_ON == 1) {
775 if (viafb_CRT_ON) { 776 if (viafb_CRT_ON) {
776 if (viafb_primary_dev == CRT_Device) 777 if (viafb_primary_dev == CRT_Device)
777 viaparinfo->crt_setting_info->iga_path = IGA1; 778 crt_iga_path = IGA1;
778 else 779 else
779 viaparinfo->crt_setting_info->iga_path = IGA2; 780 crt_iga_path = IGA2;
780 } 781 }
781 782
782 if (viafb_DVI_ON) { 783 if (viafb_DVI_ON) {
@@ -793,8 +794,7 @@ void viafb_set_iga_path(void)
793 UNICHROME_CLE266)) { 794 UNICHROME_CLE266)) {
794 viaparinfo-> 795 viaparinfo->
795 lvds_setting_info->iga_path = IGA2; 796 lvds_setting_info->iga_path = IGA2;
796 viaparinfo-> 797 crt_iga_path = IGA1;
797 crt_setting_info->iga_path = IGA1;
798 viaparinfo-> 798 viaparinfo->
799 tmds_setting_info->iga_path = IGA1; 799 tmds_setting_info->iga_path = IGA1;
800 } else 800 } else
@@ -814,10 +814,10 @@ void viafb_set_iga_path(void)
814 viafb_SAMM_ON = 0; 814 viafb_SAMM_ON = 0;
815 815
816 if (viafb_CRT_ON && viafb_LCD_ON) { 816 if (viafb_CRT_ON && viafb_LCD_ON) {
817 viaparinfo->crt_setting_info->iga_path = IGA1; 817 crt_iga_path = IGA1;
818 viaparinfo->lvds_setting_info->iga_path = IGA2; 818 viaparinfo->lvds_setting_info->iga_path = IGA2;
819 } else if (viafb_CRT_ON && viafb_DVI_ON) { 819 } else if (viafb_CRT_ON && viafb_DVI_ON) {
820 viaparinfo->crt_setting_info->iga_path = IGA1; 820 crt_iga_path = IGA1;
821 viaparinfo->tmds_setting_info->iga_path = IGA2; 821 viaparinfo->tmds_setting_info->iga_path = IGA2;
822 } else if (viafb_LCD_ON && viafb_DVI_ON) { 822 } else if (viafb_LCD_ON && viafb_DVI_ON) {
823 viaparinfo->tmds_setting_info->iga_path = IGA1; 823 viaparinfo->tmds_setting_info->iga_path = IGA1;
@@ -826,7 +826,7 @@ void viafb_set_iga_path(void)
826 viaparinfo->lvds_setting_info->iga_path = IGA2; 826 viaparinfo->lvds_setting_info->iga_path = IGA2;
827 viaparinfo->lvds_setting_info2->iga_path = IGA2; 827 viaparinfo->lvds_setting_info2->iga_path = IGA2;
828 } else if (viafb_CRT_ON) { 828 } else if (viafb_CRT_ON) {
829 viaparinfo->crt_setting_info->iga_path = IGA1; 829 crt_iga_path = IGA1;
830 } else if (viafb_LCD_ON) { 830 } else if (viafb_LCD_ON) {
831 viaparinfo->lvds_setting_info->iga_path = IGA2; 831 viaparinfo->lvds_setting_info->iga_path = IGA2;
832 } else if (viafb_DVI_ON) { 832 } else if (viafb_DVI_ON) {
@@ -837,7 +837,7 @@ void viafb_set_iga_path(void)
837 viaparinfo->shared->iga1_devices = 0; 837 viaparinfo->shared->iga1_devices = 0;
838 viaparinfo->shared->iga2_devices = 0; 838 viaparinfo->shared->iga2_devices = 0;
839 if (viafb_CRT_ON) { 839 if (viafb_CRT_ON) {
840 if (viaparinfo->crt_setting_info->iga_path == IGA1) 840 if (crt_iga_path == IGA1)
841 viaparinfo->shared->iga1_devices |= VIA_CRT; 841 viaparinfo->shared->iga1_devices |= VIA_CRT;
842 else 842 else
843 viaparinfo->shared->iga2_devices |= VIA_CRT; 843 viaparinfo->shared->iga2_devices |= VIA_CRT;
@@ -2072,8 +2072,6 @@ void __devinit viafb_init_chip_info(int chip_type)
2072 init_tmds_chip_info(); 2072 init_tmds_chip_info();
2073 init_lvds_chip_info(); 2073 init_lvds_chip_info();
2074 2074
2075 viaparinfo->crt_setting_info->iga_path = IGA1;
2076
2077 /*Set IGA path for each device */ 2075 /*Set IGA path for each device */
2078 viafb_set_iga_path(); 2076 viafb_set_iga_path();
2079 2077
@@ -2450,15 +2448,15 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
2450 2448
2451 /* CRT set mode */ 2449 /* CRT set mode */
2452 if (viafb_CRT_ON) { 2450 if (viafb_CRT_ON) {
2453 if (viafb_SAMM_ON && (viaparinfo->crt_setting_info->iga_path == 2451 if (viafb_SAMM_ON &&
2454 IGA2)) { 2452 viaparinfo->shared->iga2_devices & VIA_CRT) {
2455 viafb_fill_crtc_timing(crt_timing1, vmode_tbl1, 2453 viafb_fill_crtc_timing(crt_timing1, vmode_tbl1,
2456 video_bpp1 / 8, 2454 video_bpp1 / 8, IGA2);
2457 viaparinfo->crt_setting_info->iga_path);
2458 } else { 2455 } else {
2459 viafb_fill_crtc_timing(crt_timing, vmode_tbl, 2456 viafb_fill_crtc_timing(crt_timing, vmode_tbl,
2460 video_bpp / 8, 2457 video_bpp / 8,
2461 viaparinfo->crt_setting_info->iga_path); 2458 (viaparinfo->shared->iga1_devices & VIA_CRT)
2459 ? IGA1 : IGA2);
2462 } 2460 }
2463 2461
2464 /* Patch if set_hres is not 8 alignment (1366) to viafb_setmode 2462 /* Patch if set_hres is not 8 alignment (1366) to viafb_setmode
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index 9d9bb9b4ed3..ed9bd7978cc 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -930,10 +930,8 @@ static int get_primary_device(void)
930 /* Rule: device on iga1 path are the primary device. */ 930 /* Rule: device on iga1 path are the primary device. */
931 if (viafb_SAMM_ON) { 931 if (viafb_SAMM_ON) {
932 if (viafb_CRT_ON) { 932 if (viafb_CRT_ON) {
933 if (viaparinfo->crt_setting_info->iga_path == IGA1) { 933 if (viaparinfo->shared->iga1_devices & VIA_CRT) {
934 DEBUG_MSG(KERN_INFO "CRT IGA Path:%d\n", 934 DEBUG_MSG(KERN_INFO "CRT IGA Path:%d\n", IGA1);
935 viaparinfo->
936 crt_setting_info->iga_path);
937 primary_device = CRT_Device; 935 primary_device = CRT_Device;
938 } 936 }
939 } 937 }
@@ -1746,7 +1744,6 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev)
1746 viaparinfo->lvds_setting_info = &viaparinfo->shared->lvds_setting_info; 1744 viaparinfo->lvds_setting_info = &viaparinfo->shared->lvds_setting_info;
1747 viaparinfo->lvds_setting_info2 = 1745 viaparinfo->lvds_setting_info2 =
1748 &viaparinfo->shared->lvds_setting_info2; 1746 &viaparinfo->shared->lvds_setting_info2;
1749 viaparinfo->crt_setting_info = &viaparinfo->shared->crt_setting_info;
1750 viaparinfo->chip_info = &viaparinfo->shared->chip_info; 1747 viaparinfo->chip_info = &viaparinfo->shared->chip_info;
1751 1748
1752 if (viafb_dual_fb) 1749 if (viafb_dual_fb)
diff --git a/drivers/video/via/viafbdev.h b/drivers/video/via/viafbdev.h
index d66f963e930..ff60e1ddcff 100644
--- a/drivers/video/via/viafbdev.h
+++ b/drivers/video/via/viafbdev.h
@@ -50,7 +50,6 @@ struct viafb_shared {
50 50
51 /* All the information will be needed to set engine */ 51 /* All the information will be needed to set engine */
52 struct tmds_setting_information tmds_setting_info; 52 struct tmds_setting_information tmds_setting_info;
53 struct crt_setting_information crt_setting_info;
54 struct lvds_setting_information lvds_setting_info; 53 struct lvds_setting_information lvds_setting_info;
55 struct lvds_setting_information lvds_setting_info2; 54 struct lvds_setting_information lvds_setting_info2;
56 struct chip_information chip_info; 55 struct chip_information chip_info;
@@ -79,7 +78,6 @@ struct viafb_par {
79 /* All the information will be needed to set engine */ 78 /* All the information will be needed to set engine */
80 /* depreciated, use the ones in shared directly */ 79 /* depreciated, use the ones in shared directly */
81 struct tmds_setting_information *tmds_setting_info; 80 struct tmds_setting_information *tmds_setting_info;
82 struct crt_setting_information *crt_setting_info;
83 struct lvds_setting_information *lvds_setting_info; 81 struct lvds_setting_information *lvds_setting_info;
84 struct lvds_setting_information *lvds_setting_info2; 82 struct lvds_setting_information *lvds_setting_info2;
85 struct chip_information *chip_info; 83 struct chip_information *chip_info;