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/hw.h | |
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/hw.h')
-rw-r--r-- | drivers/video/via/hw.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/video/via/hw.h b/drivers/video/via/hw.h index b874d952b446..789c58a7bab3 100644 --- a/drivers/video/via/hw.h +++ b/drivers/video/via/hw.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __HW_H__ | 22 | #ifndef __HW_H__ |
23 | #define __HW_H__ | 23 | #define __HW_H__ |
24 | 24 | ||
25 | #include "viamode.h" | ||
25 | #include "global.h" | 26 | #include "global.h" |
26 | 27 | ||
27 | /*************************************************** | 28 | /*************************************************** |
@@ -874,8 +875,9 @@ extern int viafb_hotplug; | |||
874 | void viafb_write_reg_mask(u8 index, int io_port, u8 data, u8 mask); | 875 | void viafb_write_reg_mask(u8 index, int io_port, u8 data, u8 mask); |
875 | void viafb_set_output_path(int device, int set_iga, | 876 | void viafb_set_output_path(int device, int set_iga, |
876 | int output_interface); | 877 | int output_interface); |
878 | |||
877 | void viafb_fill_crtc_timing(struct crt_mode_table *crt_table, | 879 | void viafb_fill_crtc_timing(struct crt_mode_table *crt_table, |
878 | int mode_index, int bpp_byte, int set_iga); | 880 | struct VideoModeTable *video_mode, int bpp_byte, int set_iga); |
879 | 881 | ||
880 | void viafb_set_vclock(u32 CLK, int set_iga); | 882 | void viafb_set_vclock(u32 CLK, int set_iga); |
881 | void viafb_load_reg(int timing_value, int viafb_load_reg_num, | 883 | void viafb_load_reg(int timing_value, int viafb_load_reg_num, |
@@ -891,16 +893,16 @@ void viafb_lock_crt(void); | |||
891 | void viafb_unlock_crt(void); | 893 | void viafb_unlock_crt(void); |
892 | void viafb_load_fetch_count_reg(int h_addr, int bpp_byte, int set_iga); | 894 | void viafb_load_fetch_count_reg(int h_addr, int bpp_byte, int set_iga); |
893 | void viafb_write_regx(struct io_reg RegTable[], int ItemNum); | 895 | void viafb_write_regx(struct io_reg RegTable[], int ItemNum); |
894 | struct VideoModeTable *viafb_get_modetbl_pointer(int Index); | ||
895 | u32 viafb_get_clk_value(int clk); | 896 | u32 viafb_get_clk_value(int clk); |
896 | void viafb_load_FIFO_reg(int set_iga, int hor_active, int ver_active); | 897 | void viafb_load_FIFO_reg(int set_iga, int hor_active, int ver_active); |
897 | void viafb_set_color_depth(int bpp_byte, int set_iga); | 898 | void viafb_set_color_depth(int bpp_byte, int set_iga); |
898 | void viafb_set_dpa_gfx(int output_interface, struct GFX_DPA_SETTING\ | 899 | void viafb_set_dpa_gfx(int output_interface, struct GFX_DPA_SETTING\ |
899 | *p_gfx_dpa_setting); | 900 | *p_gfx_dpa_setting); |
900 | 901 | ||
901 | int viafb_setmode(int vmode_index, int hor_res, int ver_res, | 902 | int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp, |
902 | int video_bpp, int vmode_index1, int hor_res1, | 903 | struct VideoModeTable *vmode_tbl1, int video_bpp1); |
903 | int ver_res1, int video_bpp1); | 904 | void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, int refresh, |
905 | struct VideoModeTable *vmode_tbl); | ||
904 | void viafb_init_chip_info(struct pci_dev *pdev, | 906 | void viafb_init_chip_info(struct pci_dev *pdev, |
905 | const struct pci_device_id *pdi); | 907 | const struct pci_device_id *pdi); |
906 | void viafb_init_dac(int set_iga); | 908 | void viafb_init_dac(int set_iga); |