summaryrefslogtreecommitdiffstats
path: root/drivers/video/via/hw.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-03-11 00:04:01 +0000
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-03-12 10:22:06 +0000
commitfd3cc69848b7e1873e5f12bbcdd572b20277ecf3 (patch)
tree05ce614d358d964f36b40d3dd148770c8c8b5a4b /drivers/video/via/hw.c
parent97597a39778eefb628eb7734a18f32c7880ad0e0 (diff)
downloadlinux-fd3cc69848b7e1873e5f12bbcdd572b20277ecf3.tar.gz
linux-fd3cc69848b7e1873e5f12bbcdd572b20277ecf3.tar.bz2
linux-fd3cc69848b7e1873e5f12bbcdd572b20277ecf3.zip
viafb: remove duplicated clock storage
The clocks can be easily recalculated by the timing and refresh value. This brings us one step closer to removing VIAs modetable and use generic ones and being easier extensible. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/via/hw.c')
-rw-r--r--drivers/video/via/hw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index a7a5614c1ad8..071e3a94b589 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -2030,7 +2030,7 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table,
int i;
int index = 0;
int h_addr, v_addr;
- u32 pll_D_N;
+ u32 pll_D_N, clock;
for (i = 0; i < video_mode->mode_array; i++) {
index = i;
@@ -2083,7 +2083,9 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table,
&& (viaparinfo->chip_info->gfx_chip_name != UNICHROME_K400))
viafb_load_FIFO_reg(set_iga, h_addr, v_addr);
- pll_D_N = viafb_get_clk_value(crt_table[index].clk);
+ clock = crt_reg.hor_total * crt_reg.ver_total
+ * crt_table[index].refresh_rate;
+ pll_D_N = viafb_get_clk_value(clock);
DEBUG_MSG(KERN_INFO "PLL=%x", pll_D_N);
viafb_set_vclock(pll_D_N, set_iga);