diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2010-03-10 18:21:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:33 -0500 |
commit | dd73d6868b9ecb4841def0c6ff0a25da27db33ba (patch) | |
tree | 353558254ac6ad9561beb6f3bac7b5254301c95c /drivers/video/via/viamode.c | |
parent | 2365dfe99495159b3395dd0eddece2f0d58f527a (diff) |
viafb: split global index up
This is the first step to remove an artificial global index that was used
in two ways:
1. As a pseudo index in the mode table. Pseudo as you had to search
through the table to find the referenced entry. This was replaced by
using a pointer to the entry.
2. As a shortcut to compare a combination of horizontal and vertical
resolution at the same time.
This was replaced by a "(hres<<16) | vres" which is good enough for
now and the near future. If vres or hres become greater than 2^16 this
might indeed cause problems but this solution allows to split this
indexing mess up without the requirement to do even more code changes.
This is a big change that will allow more clean ups. It should be a bit
faster but that is probably not relevant for normal operation. No
regressions expected but as this is a relatively big step heavy testing is
appreciated.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/via/viamode.c')
-rw-r--r-- | drivers/video/via/viamode.c | 180 |
1 files changed, 93 insertions, 87 deletions
diff --git a/drivers/video/via/viamode.c b/drivers/video/via/viamode.c index b74f8a67923c..af50e244016c 100644 --- a/drivers/video/via/viamode.c +++ b/drivers/video/via/viamode.c | |||
@@ -412,7 +412,7 @@ struct io_reg PM1024x768[] = { {VIASR, 0x16, 0xBF, 0x0C}, | |||
412 | }; | 412 | }; |
413 | 413 | ||
414 | struct patch_table res_patch_table[] = { | 414 | struct patch_table res_patch_table[] = { |
415 | {VIA_RES_1024X768, ARRAY_SIZE(PM1024x768), PM1024x768} | 415 | {ARRAY_SIZE(PM1024x768), PM1024x768} |
416 | }; | 416 | }; |
417 | 417 | ||
418 | /* struct VPITTable { | 418 | /* struct VPITTable { |
@@ -879,169 +879,151 @@ struct crt_mode_table CRTM2048x1536[] = { | |||
879 | {2800, 2048, 2048, 752, 2200, 224, 1592, 1536, 1536, 56, 1539, 4} } | 879 | {2800, 2048, 2048, 752, 2200, 224, 1592, 1536, 1536, 56, 1539, 4} } |
880 | }; | 880 | }; |
881 | 881 | ||
882 | /* Video Mode Table */ | 882 | struct VideoModeTable viafb_modes[] = { |
883 | /* struct VideoModeTable {*/ | ||
884 | /* int ModeIndex;*/ | ||
885 | /* struct crt_mode_table *crtc;*/ | ||
886 | /* int mode_array;*/ | ||
887 | /* };*/ | ||
888 | struct VideoModeTable CLE266Modes[] = { | ||
889 | /* Display : 480x640 (GTF) */ | 883 | /* Display : 480x640 (GTF) */ |
890 | {VIA_RES_480X640, CRTM480x640, ARRAY_SIZE(CRTM480x640)}, | 884 | {CRTM480x640, ARRAY_SIZE(CRTM480x640)}, |
891 | 885 | ||
892 | /* Display : 640x480 */ | 886 | /* Display : 640x480 */ |
893 | {VIA_RES_640X480, CRTM640x480, ARRAY_SIZE(CRTM640x480)}, | 887 | {CRTM640x480, ARRAY_SIZE(CRTM640x480)}, |
894 | 888 | ||
895 | /* Display : 720x480 (GTF) */ | 889 | /* Display : 720x480 (GTF) */ |
896 | {VIA_RES_720X480, CRTM720x480, ARRAY_SIZE(CRTM720x480)}, | 890 | {CRTM720x480, ARRAY_SIZE(CRTM720x480)}, |
897 | 891 | ||
898 | /* Display : 720x576 (GTF) */ | 892 | /* Display : 720x576 (GTF) */ |
899 | {VIA_RES_720X576, CRTM720x576, ARRAY_SIZE(CRTM720x576)}, | 893 | {CRTM720x576, ARRAY_SIZE(CRTM720x576)}, |
900 | 894 | ||
901 | /* Display : 800x600 */ | 895 | /* Display : 800x600 */ |
902 | {VIA_RES_800X600, CRTM800x600, ARRAY_SIZE(CRTM800x600)}, | 896 | {CRTM800x600, ARRAY_SIZE(CRTM800x600)}, |
903 | 897 | ||
904 | /* Display : 800x480 (CVT) */ | 898 | /* Display : 800x480 (CVT) */ |
905 | {VIA_RES_800X480, CRTM800x480, ARRAY_SIZE(CRTM800x480)}, | 899 | {CRTM800x480, ARRAY_SIZE(CRTM800x480)}, |
906 | 900 | ||
907 | /* Display : 848x480 (CVT) */ | 901 | /* Display : 848x480 (CVT) */ |
908 | {VIA_RES_848X480, CRTM848x480, ARRAY_SIZE(CRTM848x480)}, | 902 | {CRTM848x480, ARRAY_SIZE(CRTM848x480)}, |
909 | 903 | ||
910 | /* Display : 852x480 (GTF) */ | 904 | /* Display : 852x480 (GTF) */ |
911 | {VIA_RES_856X480, CRTM852x480, ARRAY_SIZE(CRTM852x480)}, | 905 | {CRTM852x480, ARRAY_SIZE(CRTM852x480)}, |
912 | 906 | ||
913 | /* Display : 1024x512 (GTF) */ | 907 | /* Display : 1024x512 (GTF) */ |
914 | {VIA_RES_1024X512, CRTM1024x512, ARRAY_SIZE(CRTM1024x512)}, | 908 | {CRTM1024x512, ARRAY_SIZE(CRTM1024x512)}, |
915 | 909 | ||
916 | /* Display : 1024x600 */ | 910 | /* Display : 1024x600 */ |
917 | {VIA_RES_1024X600, CRTM1024x600, ARRAY_SIZE(CRTM1024x600)}, | 911 | {CRTM1024x600, ARRAY_SIZE(CRTM1024x600)}, |
918 | |||
919 | /* Display : 1024x576 (GTF) */ | ||
920 | /*{ VIA_RES_1024X576, CRTM1024x576, ARRAY_SIZE(CRTM1024x576)}, */ | ||
921 | 912 | ||
922 | /* Display : 1024x768 */ | 913 | /* Display : 1024x768 */ |
923 | {VIA_RES_1024X768, CRTM1024x768, ARRAY_SIZE(CRTM1024x768)}, | 914 | {CRTM1024x768, ARRAY_SIZE(CRTM1024x768)}, |
924 | 915 | ||
925 | /* Display : 1152x864 */ | 916 | /* Display : 1152x864 */ |
926 | {VIA_RES_1152X864, CRTM1152x864, ARRAY_SIZE(CRTM1152x864)}, | 917 | {CRTM1152x864, ARRAY_SIZE(CRTM1152x864)}, |
927 | 918 | ||
928 | /* Display : 1280x768 (GTF) */ | 919 | /* Display : 1280x768 (GTF) */ |
929 | {VIA_RES_1280X768, CRTM1280x768, ARRAY_SIZE(CRTM1280x768)}, | 920 | {CRTM1280x768, ARRAY_SIZE(CRTM1280x768)}, |
930 | 921 | ||
931 | /* Display : 960x600 (CVT) */ | 922 | /* Display : 960x600 (CVT) */ |
932 | {VIA_RES_960X600, CRTM960x600, ARRAY_SIZE(CRTM960x600)}, | 923 | {CRTM960x600, ARRAY_SIZE(CRTM960x600)}, |
933 | 924 | ||
934 | /* Display : 1000x600 (GTF) */ | 925 | /* Display : 1000x600 (GTF) */ |
935 | {VIA_RES_1000X600, CRTM1000x600, ARRAY_SIZE(CRTM1000x600)}, | 926 | {CRTM1000x600, ARRAY_SIZE(CRTM1000x600)}, |
936 | 927 | ||
937 | /* Display : 1024x576 (GTF) */ | 928 | /* Display : 1024x576 (GTF) */ |
938 | {VIA_RES_1024X576, CRTM1024x576, ARRAY_SIZE(CRTM1024x576)}, | 929 | {CRTM1024x576, ARRAY_SIZE(CRTM1024x576)}, |
939 | 930 | ||
940 | /* Display : 1088x612 (GTF) */ | 931 | /* Display : 1088x612 (GTF) */ |
941 | {VIA_RES_1088X612, CRTM1088x612, ARRAY_SIZE(CRTM1088x612)}, | 932 | {CRTM1088x612, ARRAY_SIZE(CRTM1088x612)}, |
942 | 933 | ||
943 | /* Display : 1152x720 (CVT) */ | 934 | /* Display : 1152x720 (CVT) */ |
944 | {VIA_RES_1152X720, CRTM1152x720, ARRAY_SIZE(CRTM1152x720)}, | 935 | {CRTM1152x720, ARRAY_SIZE(CRTM1152x720)}, |
945 | 936 | ||
946 | /* Display : 1200x720 (GTF) */ | 937 | /* Display : 1200x720 (GTF) */ |
947 | {VIA_RES_1200X720, CRTM1200x720, ARRAY_SIZE(CRTM1200x720)}, | 938 | {CRTM1200x720, ARRAY_SIZE(CRTM1200x720)}, |
948 | 939 | ||
949 | /* Display : 1280x600 (GTF) */ | 940 | /* Display : 1280x600 (GTF) */ |
950 | {VIA_RES_1280X600, CRTM1280x600, ARRAY_SIZE(CRTM1280x600)}, | 941 | {CRTM1280x600, ARRAY_SIZE(CRTM1280x600)}, |
951 | 942 | ||
952 | /* Display : 1280x800 (CVT) */ | 943 | /* Display : 1280x800 (CVT) */ |
953 | {VIA_RES_1280X800, CRTM1280x800, ARRAY_SIZE(CRTM1280x800)}, | 944 | {CRTM1280x800, ARRAY_SIZE(CRTM1280x800)}, |
954 | |||
955 | /* Display : 1280x800 (GTF) */ | ||
956 | /*{ M1280x800, CRTM1280x800, ARRAY_SIZE(CRTM1280x800)}, */ | ||
957 | 945 | ||
958 | /* Display : 1280x960 */ | 946 | /* Display : 1280x960 */ |
959 | {VIA_RES_1280X960, CRTM1280x960, ARRAY_SIZE(CRTM1280x960)}, | 947 | {CRTM1280x960, ARRAY_SIZE(CRTM1280x960)}, |
960 | 948 | ||
961 | /* Display : 1280x1024 */ | 949 | /* Display : 1280x1024 */ |
962 | {VIA_RES_1280X1024, CRTM1280x1024, ARRAY_SIZE(CRTM1280x1024)}, | 950 | {CRTM1280x1024, ARRAY_SIZE(CRTM1280x1024)}, |
963 | 951 | ||
964 | /* Display : 1360x768 (CVT) */ | 952 | /* Display : 1360x768 (CVT) */ |
965 | {VIA_RES_1360X768, CRTM1360x768, ARRAY_SIZE(CRTM1360x768)}, | 953 | {CRTM1360x768, ARRAY_SIZE(CRTM1360x768)}, |
966 | |||
967 | /* Display : 1360x768 (CVT Reduce Blanking) */ | ||
968 | {VIA_RES_1360X768_RB, CRTM1360x768_RB, | ||
969 | ARRAY_SIZE(CRTM1360x768_RB)}, | ||
970 | 954 | ||
971 | /* Display : 1366x768 */ | 955 | /* Display : 1366x768 */ |
972 | {VIA_RES_1366X768, CRTM1366x768, ARRAY_SIZE(CRTM1366x768)}, | 956 | {CRTM1366x768, ARRAY_SIZE(CRTM1366x768)}, |
973 | 957 | ||
974 | /* Display : 1368x768 (GTF) */ | 958 | /* Display : 1368x768 (GTF) */ |
975 | /*{ M1368x768,CRTM1368x768,ARRAY_SIZE(CRTM1368x768)}, */ | 959 | {CRTM1368x768, ARRAY_SIZE(CRTM1368x768)}, |
976 | /* Display : 1368x768 (GTF) */ | ||
977 | {VIA_RES_1368X768, CRTM1368x768, ARRAY_SIZE(CRTM1368x768)}, | ||
978 | 960 | ||
979 | /* Display : 1440x900 (CVT) */ | 961 | /* Display : 1440x900 (CVT) */ |
980 | {VIA_RES_1440X900, CRTM1440x900, ARRAY_SIZE(CRTM1440x900)}, | 962 | {CRTM1440x900, ARRAY_SIZE(CRTM1440x900)}, |
981 | |||
982 | /* Display : 1440x900 (CVT Reduce Blanking) */ | ||
983 | {VIA_RES_1440X900_RB, CRTM1440x900_RB, | ||
984 | ARRAY_SIZE(CRTM1440x900_RB)}, | ||
985 | 963 | ||
986 | /* Display : 1440x1050 (GTF) */ | 964 | /* Display : 1440x1050 (GTF) */ |
987 | {VIA_RES_1440X1050, CRTM1440x1050, ARRAY_SIZE(CRTM1440x1050)}, | 965 | {CRTM1440x1050, ARRAY_SIZE(CRTM1440x1050)}, |
988 | |||
989 | /* Display : 1400x1050 (CVT Reduce Blanking) */ | ||
990 | {VIA_RES_1400X1050_RB, CRTM1400x1050_RB, | ||
991 | ARRAY_SIZE(CRTM1400x1050_RB)}, | ||
992 | 966 | ||
993 | /* Display : 1600x900 (CVT) */ | 967 | /* Display : 1600x900 (CVT) */ |
994 | {VIA_RES_1600X900, CRTM1600x900, ARRAY_SIZE(CRTM1600x900)}, | 968 | {CRTM1600x900, ARRAY_SIZE(CRTM1600x900)}, |
995 | |||
996 | /* Display : 1600x900 (CVT Reduce Blanking) */ | ||
997 | {VIA_RES_1600X900_RB, CRTM1600x900_RB, | ||
998 | ARRAY_SIZE(CRTM1600x900_RB)}, | ||
999 | 969 | ||
1000 | /* Display : 1600x1024 (GTF) */ | 970 | /* Display : 1600x1024 (GTF) */ |
1001 | {VIA_RES_1600X1024, CRTM1600x1024, ARRAY_SIZE(CRTM1600x1024)}, | 971 | {CRTM1600x1024, ARRAY_SIZE(CRTM1600x1024)}, |
1002 | 972 | ||
1003 | /* Display : 1600x1200 */ | 973 | /* Display : 1600x1200 */ |
1004 | {VIA_RES_1600X1200, CRTM1600x1200, ARRAY_SIZE(CRTM1600x1200)}, | 974 | {CRTM1600x1200, ARRAY_SIZE(CRTM1600x1200)}, |
1005 | 975 | ||
1006 | /* Display : 1680x1050 (CVT) */ | 976 | /* Display : 1680x1050 (CVT) */ |
1007 | {VIA_RES_1680X1050, CRTM1680x1050, ARRAY_SIZE(CRTM1680x1050)}, | 977 | {CRTM1680x1050, ARRAY_SIZE(CRTM1680x1050)}, |
1008 | |||
1009 | /* Display : 1680x1050 (CVT Reduce Blanking) */ | ||
1010 | {VIA_RES_1680X1050_RB, CRTM1680x1050_RB, | ||
1011 | ARRAY_SIZE(CRTM1680x1050_RB)}, | ||
1012 | 978 | ||
1013 | /* Display : 1792x1344 (DMT) */ | 979 | /* Display : 1792x1344 (DMT) */ |
1014 | {VIA_RES_1792X1344, CRTM1792x1344, ARRAY_SIZE(CRTM1792x1344)}, | 980 | {CRTM1792x1344, ARRAY_SIZE(CRTM1792x1344)}, |
1015 | 981 | ||
1016 | /* Display : 1856x1392 (DMT) */ | 982 | /* Display : 1856x1392 (DMT) */ |
1017 | {VIA_RES_1856X1392, CRTM1856x1392, ARRAY_SIZE(CRTM1856x1392)}, | 983 | {CRTM1856x1392, ARRAY_SIZE(CRTM1856x1392)}, |
1018 | 984 | ||
1019 | /* Display : 1920x1440 */ | 985 | /* Display : 1920x1440 */ |
1020 | {VIA_RES_1920X1440, CRTM1920x1440, ARRAY_SIZE(CRTM1920x1440)}, | 986 | {CRTM1920x1440, ARRAY_SIZE(CRTM1920x1440)}, |
1021 | 987 | ||
1022 | /* Display : 2048x1536 */ | 988 | /* Display : 2048x1536 */ |
1023 | {VIA_RES_2048X1536, CRTM2048x1536, ARRAY_SIZE(CRTM2048x1536)}, | 989 | {CRTM2048x1536, ARRAY_SIZE(CRTM2048x1536)}, |
1024 | 990 | ||
1025 | /* Display : 1280x720 */ | 991 | /* Display : 1280x720 */ |
1026 | {VIA_RES_1280X720, CRTM1280x720, ARRAY_SIZE(CRTM1280x720)}, | 992 | {CRTM1280x720, ARRAY_SIZE(CRTM1280x720)}, |
1027 | 993 | ||
1028 | /* Display : 1920x1080 (CVT) */ | 994 | /* Display : 1920x1080 (CVT) */ |
1029 | {VIA_RES_1920X1080, CRTM1920x1080, ARRAY_SIZE(CRTM1920x1080)}, | 995 | {CRTM1920x1080, ARRAY_SIZE(CRTM1920x1080)}, |
1030 | |||
1031 | /* Display : 1920x1080 (CVT Reduce Blanking) */ | ||
1032 | {VIA_RES_1920X1080_RB, CRTM1920x1080_RB, | ||
1033 | ARRAY_SIZE(CRTM1920x1080_RB)}, | ||
1034 | 996 | ||
1035 | /* Display : 1920x1200 (CVT) */ | 997 | /* Display : 1920x1200 (CVT) */ |
1036 | {VIA_RES_1920X1200, CRTM1920x1200, ARRAY_SIZE(CRTM1920x1200)}, | 998 | {CRTM1920x1200, ARRAY_SIZE(CRTM1920x1200)}, |
1037 | |||
1038 | /* Display : 1920x1200 (CVT Reduce Blanking) */ | ||
1039 | {VIA_RES_1920X1200_RB, CRTM1920x1200_RB, | ||
1040 | ARRAY_SIZE(CRTM1920x1200_RB)}, | ||
1041 | 999 | ||
1042 | /* Display : 1400x1050 (CVT) */ | 1000 | /* Display : 1400x1050 (CVT) */ |
1043 | {VIA_RES_1400X1050, CRTM1400x1050, ARRAY_SIZE(CRTM1400x1050)} | 1001 | {CRTM1400x1050, ARRAY_SIZE(CRTM1400x1050)} |
1044 | }; | 1002 | }; |
1003 | |||
1004 | struct VideoModeTable viafb_rb_modes[] = { | ||
1005 | /* Display : 1360x768 (CVT Reduce Blanking) */ | ||
1006 | {CRTM1360x768_RB, ARRAY_SIZE(CRTM1360x768_RB)}, | ||
1007 | |||
1008 | /* Display : 1440x900 (CVT Reduce Blanking) */ | ||
1009 | {CRTM1440x900_RB, ARRAY_SIZE(CRTM1440x900_RB)}, | ||
1010 | |||
1011 | /* Display : 1400x1050 (CVT Reduce Blanking) */ | ||
1012 | {CRTM1400x1050_RB, ARRAY_SIZE(CRTM1400x1050_RB)}, | ||
1013 | |||
1014 | /* Display : 1600x900 (CVT Reduce Blanking) */ | ||
1015 | {CRTM1600x900_RB, ARRAY_SIZE(CRTM1600x900_RB)}, | ||
1016 | |||
1017 | /* Display : 1680x1050 (CVT Reduce Blanking) */ | ||
1018 | {CRTM1680x1050_RB, ARRAY_SIZE(CRTM1680x1050_RB)}, | ||
1019 | |||
1020 | /* Display : 1920x1080 (CVT Reduce Blanking) */ | ||
1021 | {CRTM1920x1080_RB, ARRAY_SIZE(CRTM1920x1080_RB)}, | ||
1022 | |||
1023 | /* Display : 1920x1200 (CVT Reduce Blanking) */ | ||
1024 | {CRTM1920x1200_RB, ARRAY_SIZE(CRTM1920x1200_RB)} | ||
1025 | }; | ||
1026 | |||
1045 | struct crt_mode_table CEAM1280x720[] = { | 1027 | struct crt_mode_table CEAM1280x720[] = { |
1046 | {REFRESH_60, CLK_74_270M, M1280X720_CEA_R60_HSP, | 1028 | {REFRESH_60, CLK_74_270M, M1280X720_CEA_R60_HSP, |
1047 | M1280X720_CEA_R60_VSP, | 1029 | M1280X720_CEA_R60_VSP, |
@@ -1056,8 +1038,8 @@ struct crt_mode_table CEAM1920x1080[] = { | |||
1056 | }; | 1038 | }; |
1057 | struct VideoModeTable CEA_HDMI_Modes[] = { | 1039 | struct VideoModeTable CEA_HDMI_Modes[] = { |
1058 | /* Display : 1280x720 */ | 1040 | /* Display : 1280x720 */ |
1059 | {VIA_RES_1280X720, CEAM1280x720, ARRAY_SIZE(CEAM1280x720)}, | 1041 | {CEAM1280x720, ARRAY_SIZE(CEAM1280x720)}, |
1060 | {VIA_RES_1920X1080, CEAM1920x1080, ARRAY_SIZE(CEAM1920x1080)} | 1042 | {CEAM1920x1080, ARRAY_SIZE(CEAM1920x1080)} |
1061 | }; | 1043 | }; |
1062 | 1044 | ||
1063 | int NUM_TOTAL_RES_MAP_REFRESH = ARRAY_SIZE(res_map_refresh_tbl); | 1045 | int NUM_TOTAL_RES_MAP_REFRESH = ARRAY_SIZE(res_map_refresh_tbl); |
@@ -1069,4 +1051,28 @@ int NUM_TOTAL_CX700_ModeXregs = ARRAY_SIZE(CX700_ModeXregs); | |||
1069 | int NUM_TOTAL_VX855_ModeXregs = ARRAY_SIZE(VX855_ModeXregs); | 1051 | int NUM_TOTAL_VX855_ModeXregs = ARRAY_SIZE(VX855_ModeXregs); |
1070 | int NUM_TOTAL_CLE266_ModeXregs = ARRAY_SIZE(CLE266_ModeXregs); | 1052 | int NUM_TOTAL_CLE266_ModeXregs = ARRAY_SIZE(CLE266_ModeXregs); |
1071 | int NUM_TOTAL_PATCH_MODE = ARRAY_SIZE(res_patch_table); | 1053 | int NUM_TOTAL_PATCH_MODE = ARRAY_SIZE(res_patch_table); |
1072 | int NUM_TOTAL_MODETABLE = ARRAY_SIZE(CLE266Modes); | 1054 | |
1055 | |||
1056 | struct VideoModeTable *viafb_get_mode(int hres, int vres) | ||
1057 | { | ||
1058 | u32 i; | ||
1059 | for (i = 0; i < ARRAY_SIZE(viafb_modes); i++) | ||
1060 | if (viafb_modes[i].mode_array && | ||
1061 | viafb_modes[i].crtc[0].crtc.hor_addr == hres && | ||
1062 | viafb_modes[i].crtc[0].crtc.ver_addr == vres) | ||
1063 | return &viafb_modes[i]; | ||
1064 | |||
1065 | return NULL; | ||
1066 | } | ||
1067 | |||
1068 | struct VideoModeTable *viafb_get_rb_mode(int hres, int vres) | ||
1069 | { | ||
1070 | u32 i; | ||
1071 | for (i = 0; i < ARRAY_SIZE(viafb_rb_modes); i++) | ||
1072 | if (viafb_rb_modes[i].mode_array && | ||
1073 | viafb_rb_modes[i].crtc[0].crtc.hor_addr == hres && | ||
1074 | viafb_rb_modes[i].crtc[0].crtc.ver_addr == vres) | ||
1075 | return &viafb_rb_modes[i]; | ||
1076 | |||
1077 | return NULL; | ||
1078 | } | ||