aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/hw.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-09-19 00:40:15 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-09-23 22:15:25 -0400
commita2aa9f9f5ad94c8e0e767110c7a659de84a6b762 (patch)
treeb0d2510ecd7272658c005522041eb2014d2e965e /drivers/video/via/hw.c
parentdd7a0b08cd921763e570f693ecc4816aa2f1a3fd (diff)
viafb: rename output devices
Now it looks like we finally know enough about the output devices to give them proper names. As VIA_96 is often referred to as DVP0 rename it to VIA_DVP0. As VIA_6C and VIA_93 seem to exist only on CLE266 and "replace" DVP0 and DVP1 there rename them to VIA_LDVP0 and VIA_LDVP1 (L as legacy). The proc names were changed accordingly which should be harmless as they were just introduced and not beyond RFC state. This patch should make things a bit more comfortable and less scary. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jonathan Corbet <corbet@lwn.net> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/video/via/hw.c')
-rw-r--r--drivers/video/via/hw.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index 00fecb579acc..7d7010acf148 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -719,9 +719,9 @@ static struct rgbLUT palLUT_table[] = {
719}; 719};
720 720
721static struct via_device_mapping device_mapping[] = { 721static struct via_device_mapping device_mapping[] = {
722 {VIA_6C, "6C"}, 722 {VIA_LDVP0, "LDVP0"},
723 {VIA_93, "93"}, 723 {VIA_LDVP1, "LDVP1"},
724 {VIA_96, "96"}, 724 {VIA_DVP0, "DVP0"},
725 {VIA_CRT, "CRT"}, 725 {VIA_CRT, "CRT"},
726 {VIA_DVP1, "DVP1"}, 726 {VIA_DVP1, "DVP1"},
727 {VIA_LVDS1, "LVDS1"}, 727 {VIA_LVDS1, "LVDS1"},
@@ -763,11 +763,11 @@ static u32 get_dvi_devices(int output_interface)
763{ 763{
764 switch (output_interface) { 764 switch (output_interface) {
765 case INTERFACE_DVP0: 765 case INTERFACE_DVP0:
766 return VIA_96 | VIA_6C; 766 return VIA_DVP0 | VIA_LDVP0;
767 767
768 case INTERFACE_DVP1: 768 case INTERFACE_DVP1:
769 if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_CLE266) 769 if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_CLE266)
770 return VIA_93; 770 return VIA_LDVP1;
771 else 771 else
772 return VIA_DVP1; 772 return VIA_DVP1;
773 773
@@ -775,7 +775,7 @@ static u32 get_dvi_devices(int output_interface)
775 if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_CLE266) 775 if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_CLE266)
776 return 0; 776 return 0;
777 else 777 else
778 return VIA_LVDS2 | VIA_96; 778 return VIA_LVDS2 | VIA_DVP0;
779 779
780 case INTERFACE_DFP_LOW: 780 case INTERFACE_DFP_LOW:
781 if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_CLE266) 781 if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_CLE266)
@@ -794,13 +794,13 @@ static u32 get_lcd_devices(int output_interface)
794{ 794{
795 switch (output_interface) { 795 switch (output_interface) {
796 case INTERFACE_DVP0: 796 case INTERFACE_DVP0:
797 return VIA_96; 797 return VIA_DVP0;
798 798
799 case INTERFACE_DVP1: 799 case INTERFACE_DVP1:
800 return VIA_DVP1; 800 return VIA_DVP1;
801 801
802 case INTERFACE_DFP_HIGH: 802 case INTERFACE_DFP_HIGH:
803 return VIA_LVDS2 | VIA_96; 803 return VIA_LVDS2 | VIA_DVP0;
804 804
805 case INTERFACE_DFP_LOW: 805 case INTERFACE_DFP_LOW:
806 return VIA_LVDS1 | VIA_DVP1; 806 return VIA_LVDS1 | VIA_DVP1;
@@ -988,17 +988,17 @@ static void set_crt_source(u8 iga)
988 via_write_reg_mask(VIASR, 0x16, value, 0x40); 988 via_write_reg_mask(VIASR, 0x16, value, 0x40);
989} 989}
990 990
991static inline void set_6C_source(u8 iga) 991static inline void set_ldvp0_source(u8 iga)
992{ 992{
993 set_source_common(0x6C, 7, iga); 993 set_source_common(0x6C, 7, iga);
994} 994}
995 995
996static inline void set_93_source(u8 iga) 996static inline void set_ldvp1_source(u8 iga)
997{ 997{
998 set_source_common(0x93, 7, iga); 998 set_source_common(0x93, 7, iga);
999} 999}
1000 1000
1001static inline void set_96_source(u8 iga) 1001static inline void set_dvp0_source(u8 iga)
1002{ 1002{
1003 set_source_common(0x96, 4, iga); 1003 set_source_common(0x96, 4, iga);
1004} 1004}
@@ -1020,12 +1020,12 @@ static inline void set_lvds2_source(u8 iga)
1020 1020
1021void via_set_source(u32 devices, u8 iga) 1021void via_set_source(u32 devices, u8 iga)
1022{ 1022{
1023 if (devices & VIA_6C) 1023 if (devices & VIA_LDVP0)
1024 set_6C_source(iga); 1024 set_ldvp0_source(iga);
1025 if (devices & VIA_93) 1025 if (devices & VIA_LDVP1)
1026 set_93_source(iga); 1026 set_ldvp1_source(iga);
1027 if (devices & VIA_96) 1027 if (devices & VIA_DVP0)
1028 set_96_source(iga); 1028 set_dvp0_source(iga);
1029 if (devices & VIA_CRT) 1029 if (devices & VIA_CRT)
1030 set_crt_source(iga); 1030 set_crt_source(iga);
1031 if (devices & VIA_DVP1) 1031 if (devices & VIA_DVP1)
@@ -1060,7 +1060,7 @@ static void set_crt_state(u8 state)
1060 via_write_reg_mask(VIACR, 0x36, value, 0x30); 1060 via_write_reg_mask(VIACR, 0x36, value, 0x30);
1061} 1061}
1062 1062
1063static void set_96_state(u8 state) 1063static void set_dvp0_state(u8 state)
1064{ 1064{
1065 u8 value; 1065 u8 value;
1066 1066
@@ -1136,11 +1136,11 @@ void via_set_state(u32 devices, u8 state)
1136{ 1136{
1137 /* 1137 /*
1138 TODO: Can we enable/disable these devices? How? 1138 TODO: Can we enable/disable these devices? How?
1139 if (devices & VIA_6C) 1139 if (devices & VIA_LDVP0)
1140 if (devices & VIA_93) 1140 if (devices & VIA_LDVP1)
1141 */ 1141 */
1142 if (devices & VIA_96) 1142 if (devices & VIA_DVP0)
1143 set_96_state(state); 1143 set_dvp0_state(state);
1144 if (devices & VIA_CRT) 1144 if (devices & VIA_CRT)
1145 set_crt_state(state); 1145 set_crt_state(state);
1146 if (devices & VIA_DVP1) 1146 if (devices & VIA_DVP1)