aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/vt1636.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-12-10 23:01:13 -0500
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-03-09 13:58:26 -0500
commitdbf85f2326dbb070256ff153853b00f70c27717a (patch)
tree2a5efe52b54ed151bbe8bd0ce39ee8c1a41ec6ec /drivers/video/via/vt1636.c
parent23e5abd5555b86fd56af6383e7a832b0cf2a2d95 (diff)
viafb: kill lcd_panel_id
This patch removes all internal uses of another mostly artificial value. It does duplicate the information of the maximum resolution and it is not flexible as only a few resolutions exist. Hence it is better to remove it and clean the mess up. No runtime change expected. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/via/vt1636.c')
-rw-r--r--drivers/video/via/vt1636.c43
1 files changed, 13 insertions, 30 deletions
diff --git a/drivers/video/via/vt1636.c b/drivers/video/via/vt1636.c
index 60e4192c2b34..ee2903b472cf 100644
--- a/drivers/video/via/vt1636.c
+++ b/drivers/video/via/vt1636.c
@@ -167,22 +167,6 @@ static int get_clk_range_index(u32 Clk)
167 return DPA_CLK_RANGE_150M; 167 return DPA_CLK_RANGE_150M;
168} 168}
169 169
170static int get_lvds_dpa_setting_index(int panel_size_id,
171 struct VT1636_DPA_SETTING *p_vt1636_dpasetting_tbl,
172 int tbl_size)
173{
174 int i;
175
176 for (i = 0; i < tbl_size; i++) {
177 if (panel_size_id == p_vt1636_dpasetting_tbl->PanelSizeID)
178 return i;
179
180 p_vt1636_dpasetting_tbl++;
181 }
182
183 return 0;
184}
185
186static void set_dpa_vt1636(struct lvds_setting_information 170static void set_dpa_vt1636(struct lvds_setting_information
187 *plvds_setting_info, struct lvds_chip_information *plvds_chip_info, 171 *plvds_setting_info, struct lvds_chip_information *plvds_chip_info,
188 struct VT1636_DPA_SETTING *p_vt1636_dpa_setting) 172 struct VT1636_DPA_SETTING *p_vt1636_dpa_setting)
@@ -206,7 +190,9 @@ void viafb_vt1636_patch_skew_on_vt3324(
206 struct lvds_setting_information *plvds_setting_info, 190 struct lvds_setting_information *plvds_setting_info,
207 struct lvds_chip_information *plvds_chip_info) 191 struct lvds_chip_information *plvds_chip_info)
208{ 192{
209 int index, size; 193 struct VT1636_DPA_SETTING dpa = {0x00, 0x00}, dpa_16x12 = {0x0B, 0x03},
194 *pdpa;
195 int index;
210 196
211 DEBUG_MSG(KERN_INFO "viafb_vt1636_patch_skew_on_vt3324.\n"); 197 DEBUG_MSG(KERN_INFO "viafb_vt1636_patch_skew_on_vt3324.\n");
212 198
@@ -216,19 +202,21 @@ void viafb_vt1636_patch_skew_on_vt3324(
216 &GFX_DPA_SETTING_TBL_VT3324[index]); 202 &GFX_DPA_SETTING_TBL_VT3324[index]);
217 203
218 /* LVDS Transmitter DPA settings: */ 204 /* LVDS Transmitter DPA settings: */
219 size = ARRAY_SIZE(VT1636_DPA_SETTING_TBL_VT3324); 205 if (plvds_setting_info->lcd_panel_hres == 1600 &&
220 index = 206 plvds_setting_info->lcd_panel_vres == 1200)
221 get_lvds_dpa_setting_index(plvds_setting_info->lcd_panel_id, 207 pdpa = &dpa_16x12;
222 VT1636_DPA_SETTING_TBL_VT3324, size); 208 else
223 set_dpa_vt1636(plvds_setting_info, plvds_chip_info, 209 pdpa = &dpa;
224 &VT1636_DPA_SETTING_TBL_VT3324[index]); 210
211 set_dpa_vt1636(plvds_setting_info, plvds_chip_info, pdpa);
225} 212}
226 213
227void viafb_vt1636_patch_skew_on_vt3327( 214void viafb_vt1636_patch_skew_on_vt3327(
228 struct lvds_setting_information *plvds_setting_info, 215 struct lvds_setting_information *plvds_setting_info,
229 struct lvds_chip_information *plvds_chip_info) 216 struct lvds_chip_information *plvds_chip_info)
230{ 217{
231 int index, size; 218 struct VT1636_DPA_SETTING dpa = {0x00, 0x00};
219 int index;
232 220
233 DEBUG_MSG(KERN_INFO "viafb_vt1636_patch_skew_on_vt3327.\n"); 221 DEBUG_MSG(KERN_INFO "viafb_vt1636_patch_skew_on_vt3327.\n");
234 222
@@ -238,12 +226,7 @@ void viafb_vt1636_patch_skew_on_vt3327(
238 &GFX_DPA_SETTING_TBL_VT3327[index]); 226 &GFX_DPA_SETTING_TBL_VT3327[index]);
239 227
240 /* LVDS Transmitter DPA settings: */ 228 /* LVDS Transmitter DPA settings: */
241 size = ARRAY_SIZE(VT1636_DPA_SETTING_TBL_VT3327); 229 set_dpa_vt1636(plvds_setting_info, plvds_chip_info, &dpa);
242 index =
243 get_lvds_dpa_setting_index(plvds_setting_info->lcd_panel_id,
244 VT1636_DPA_SETTING_TBL_VT3327, size);
245 set_dpa_vt1636(plvds_setting_info, plvds_chip_info,
246 &VT1636_DPA_SETTING_TBL_VT3327[index]);
247} 230}
248 231
249void viafb_vt1636_patch_skew_on_vt3364( 232void viafb_vt1636_patch_skew_on_vt3364(