diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-08-06 23:35:25 +0000 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-08-07 01:41:24 +0000 |
commit | 42edcb162d67e8a88c7b873941c19eab689db272 (patch) | |
tree | 3332e99f497c97228a67faf7a2a2eda95f1e1904 /drivers/video/via/hw.c | |
parent | 94715ba97508dd42919a7525e362efb00dde1271 (diff) | |
download | linux-42edcb162d67e8a88c7b873941c19eab689db272.tar.gz linux-42edcb162d67e8a88c7b873941c19eab689db272.tar.bz2 linux-42edcb162d67e8a88c7b873941c19eab689db272.zip |
viafb: eliminate viafb_get_pixclock
As there is only one user we can just insert the formula where
needed. Avoids one lookup in the modetable and
viafb_fill_var_timing_info does no longer depend on the modetable.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/via/hw.c')
-rw-r--r-- | drivers/video/via/hw.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index 5e69c203163c..d7b9a9f32dee 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c @@ -2033,18 +2033,6 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp, return 1; } -int viafb_get_pixclock(int hres, int vres, int vmode_refresh) -{ - struct crt_mode_table *best; - - best = viafb_get_best_mode(hres, vres, vmode_refresh); - if (!best) - return RES_640X480_60HZ_PIXCLOCK; - - return 1000000000 / (best->crtc.hor_total * best->crtc.ver_total) - * 1000 / best->refresh_rate; -} - int viafb_get_refresh(int hres, int vres, u32 long_refresh) { struct crt_mode_table *best; @@ -2160,8 +2148,8 @@ void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, struct display_timing crt_reg; crt_reg = mode->crtc; - var->pixclock = viafb_get_pixclock(var->xres, var->yres, - mode->refresh_rate); + var->pixclock = 1000000000 / (crt_reg.hor_total * crt_reg.ver_total) + * 1000 / mode->refresh_rate; var->left_margin = crt_reg.hor_total - (crt_reg.hor_sync_start + crt_reg.hor_sync_end); var->right_margin = crt_reg.hor_sync_start - crt_reg.hor_addr; |