aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/hw.h
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-03-10 18:21:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:33 -0500
commitdd73d6868b9ecb4841def0c6ff0a25da27db33ba (patch)
tree353558254ac6ad9561beb6f3bac7b5254301c95c /drivers/video/via/hw.h
parent2365dfe99495159b3395dd0eddece2f0d58f527a (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.h12
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;
874void viafb_write_reg_mask(u8 index, int io_port, u8 data, u8 mask); 875void viafb_write_reg_mask(u8 index, int io_port, u8 data, u8 mask);
875void viafb_set_output_path(int device, int set_iga, 876void viafb_set_output_path(int device, int set_iga,
876 int output_interface); 877 int output_interface);
878
877void viafb_fill_crtc_timing(struct crt_mode_table *crt_table, 879void 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
880void viafb_set_vclock(u32 CLK, int set_iga); 882void viafb_set_vclock(u32 CLK, int set_iga);
881void viafb_load_reg(int timing_value, int viafb_load_reg_num, 883void viafb_load_reg(int timing_value, int viafb_load_reg_num,
@@ -891,16 +893,16 @@ void viafb_lock_crt(void);
891void viafb_unlock_crt(void); 893void viafb_unlock_crt(void);
892void viafb_load_fetch_count_reg(int h_addr, int bpp_byte, int set_iga); 894void viafb_load_fetch_count_reg(int h_addr, int bpp_byte, int set_iga);
893void viafb_write_regx(struct io_reg RegTable[], int ItemNum); 895void viafb_write_regx(struct io_reg RegTable[], int ItemNum);
894struct VideoModeTable *viafb_get_modetbl_pointer(int Index);
895u32 viafb_get_clk_value(int clk); 896u32 viafb_get_clk_value(int clk);
896void viafb_load_FIFO_reg(int set_iga, int hor_active, int ver_active); 897void viafb_load_FIFO_reg(int set_iga, int hor_active, int ver_active);
897void viafb_set_color_depth(int bpp_byte, int set_iga); 898void viafb_set_color_depth(int bpp_byte, int set_iga);
898void viafb_set_dpa_gfx(int output_interface, struct GFX_DPA_SETTING\ 899void viafb_set_dpa_gfx(int output_interface, struct GFX_DPA_SETTING\
899 *p_gfx_dpa_setting); 900 *p_gfx_dpa_setting);
900 901
901int viafb_setmode(int vmode_index, int hor_res, int ver_res, 902int 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); 904void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, int refresh,
905 struct VideoModeTable *vmode_tbl);
904void viafb_init_chip_info(struct pci_dev *pdev, 906void viafb_init_chip_info(struct pci_dev *pdev,
905 const struct pci_device_id *pdi); 907 const struct pci_device_id *pdi);
906void viafb_init_dac(int set_iga); 908void viafb_init_dac(int set_iga);