Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
hw.h File Reference
#include <linux/seq_file.h>
#include "viamode.h"
#include "global.h"
#include "via_modesetting.h"

Go to the source code of this file.

Data Structures

struct  io_register
 
struct  iga2_shadow_hor_total
 
struct  iga2_shadow_hor_blank_end
 
struct  iga2_shadow_ver_total
 
struct  iga2_shadow_ver_addr
 
struct  iga2_shadow_ver_blank_start
 
struct  iga2_shadow_ver_blank_end
 
struct  iga2_shadow_ver_sync_start
 
struct  iga2_shadow_ver_sync_end
 
struct  iga1_fetch_count
 
struct  iga2_fetch_count
 
struct  fetch_count
 
struct  iga1_starting_addr
 
struct  iga2_starting_addr
 
struct  starting_addr
 
struct  lcd_pwd_seq_td0
 
struct  lcd_pwd_seq_td1
 
struct  lcd_pwd_seq_td2
 
struct  lcd_pwd_seq_td3
 
struct  _lcd_pwd_seq_timer
 
struct  _lcd_hor_scaling_factor
 
struct  _lcd_ver_scaling_factor
 
struct  _lcd_scaling_factor
 
struct  pll_limit
 
struct  rgbLUT
 
struct  lcd_pwd_seq_timer
 
struct  iga1_fifo_depth_select
 
struct  iga1_fifo_threshold_select
 
struct  iga1_fifo_high_threshold_select
 
struct  iga1_display_queue_expire_num
 
struct  iga2_fifo_depth_select
 
struct  iga2_fifo_threshold_select
 
struct  iga2_fifo_high_threshold_select
 
struct  iga2_display_queue_expire_num
 
struct  fifo_depth_select
 
struct  fifo_threshold_select
 
struct  fifo_high_threshold_select
 
struct  display_queue_expire_num
 
struct  iga2_shadow_crtc_timing
 
struct  IODATA
 
struct  pci_device_id_info
 
struct  via_device_mapping
 

Macros

#define viafb_read_reg(p, i)   via_read_reg(p, i)
 
#define viafb_write_reg(i, p, d)   via_write_reg(p, i, d)
 
#define viafb_write_reg_mask(i, p, d, m)   via_write_reg_mask(p, i, d, m)
 
#define VIA_LDVP0   0x00000001
 
#define VIA_LDVP1   0x00000002
 
#define VIA_DVP0   0x00000004
 
#define VIA_CRT   0x00000010
 
#define VIA_DVP1   0x00000020
 
#define VIA_LVDS1   0x00000040
 
#define VIA_LVDS2   0x00000080
 
#define VIA_STATE_ON   0
 
#define VIA_STATE_STANDBY   1
 
#define VIA_STATE_SUSPEND   2
 
#define VIA_STATE_OFF   3
 
#define VIA_HSYNC_NEGATIVE   0x01
 
#define VIA_VSYNC_NEGATIVE   0x02
 
#define IGA2_HOR_TOTAL_SHADOW_FORMULA(x)   ((x/8)-5)
 
#define IGA2_HOR_BLANK_END_SHADOW_FORMULA(x, y)   (((x+y)/8)-1)
 
#define IGA2_VER_TOTAL_SHADOW_FORMULA(x)   ((x)-2)
 
#define IGA2_VER_ADDR_SHADOW_FORMULA(x)   ((x)-1)
 
#define IGA2_VER_BLANK_START_SHADOW_FORMULA(x)   ((x)-1)
 
#define IGA2_VER_BLANK_END_SHADOW_FORMULA(x, y)   ((x+y)-1)
 
#define IGA2_VER_SYNC_START_SHADOW_FORMULA(x)   (x)
 
#define IGA2_VER_SYNC_END_SHADOW_FORMULA(x, y)   (x+y)
 
#define IGA2_SHADOW_HOR_TOTAL_REG_NUM   2
 
#define IGA2_SHADOW_HOR_BLANK_END_REG_NUM   1
 
#define IGA2_SHADOW_VER_TOTAL_REG_NUM   2
 
#define IGA2_SHADOW_VER_ADDR_REG_NUM   2
 
#define IGA2_SHADOW_VER_BLANK_START_REG_NUM   2
 
#define IGA2_SHADOW_VER_BLANK_END_REG_NUM   2
 
#define IGA2_SHADOW_VER_SYNC_START_REG_NUM   2
 
#define IGA2_SHADOW_VER_SYNC_END_REG_NUM   1
 
#define IGA1_FETCH_COUNT_REG_NUM   2
 
#define IGA1_FETCH_COUNT_ALIGN_BYTE   16
 
#define IGA1_FETCH_COUNT_PATCH_VALUE   4
 
#define IGA1_FETCH_COUNT_FORMULA(x, y)   (((x*y)/IGA1_FETCH_COUNT_ALIGN_BYTE) + IGA1_FETCH_COUNT_PATCH_VALUE)
 
#define IGA2_FETCH_COUNT_REG_NUM   2
 
#define IGA2_FETCH_COUNT_ALIGN_BYTE   16
 
#define IGA2_FETCH_COUNT_PATCH_VALUE   0
 
#define IGA2_FETCH_COUNT_FORMULA(x, y)   (((x*y)/IGA2_FETCH_COUNT_ALIGN_BYTE) + IGA2_FETCH_COUNT_PATCH_VALUE)
 
#define IGA1_STARTING_ADDR_REG_NUM   4
 
#define IGA2_STARTING_ADDR_REG_NUM   3
 
#define K800_IGA1_FIFO_MAX_DEPTH   384
 
#define K800_IGA1_FIFO_THRESHOLD   328
 
#define K800_IGA1_FIFO_HIGH_THRESHOLD   296
 
#define K800_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   0
 
#define K800_IGA2_FIFO_MAX_DEPTH   384
 
#define K800_IGA2_FIFO_THRESHOLD   328
 
#define K800_IGA2_FIFO_HIGH_THRESHOLD   296
 
#define K800_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   128
 
#define P880_IGA1_FIFO_MAX_DEPTH   192
 
#define P880_IGA1_FIFO_THRESHOLD   128
 
#define P880_IGA1_FIFO_HIGH_THRESHOLD   64
 
#define P880_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   0
 
#define P880_IGA2_FIFO_MAX_DEPTH   96
 
#define P880_IGA2_FIFO_THRESHOLD   64
 
#define P880_IGA2_FIFO_HIGH_THRESHOLD   32
 
#define P880_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   128
 
#define CN700_IGA1_FIFO_MAX_DEPTH   96
 
#define CN700_IGA1_FIFO_THRESHOLD   80
 
#define CN700_IGA1_FIFO_HIGH_THRESHOLD   64
 
#define CN700_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   0
 
#define CN700_IGA2_FIFO_MAX_DEPTH   96
 
#define CN700_IGA2_FIFO_THRESHOLD   80
 
#define CN700_IGA2_FIFO_HIGH_THRESHOLD   32
 
#define CN700_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   128
 
#define CX700_IGA1_FIFO_MAX_DEPTH   192
 
#define CX700_IGA1_FIFO_THRESHOLD   128
 
#define CX700_IGA1_FIFO_HIGH_THRESHOLD   128
 
#define CX700_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   124
 
#define CX700_IGA2_FIFO_MAX_DEPTH   96
 
#define CX700_IGA2_FIFO_THRESHOLD   64
 
#define CX700_IGA2_FIFO_HIGH_THRESHOLD   32
 
#define CX700_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   128
 
#define K8M890_IGA1_FIFO_MAX_DEPTH   360
 
#define K8M890_IGA1_FIFO_THRESHOLD   328
 
#define K8M890_IGA1_FIFO_HIGH_THRESHOLD   296
 
#define K8M890_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   124
 
#define K8M890_IGA2_FIFO_MAX_DEPTH   360
 
#define K8M890_IGA2_FIFO_THRESHOLD   328
 
#define K8M890_IGA2_FIFO_HIGH_THRESHOLD   296
 
#define K8M890_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   124
 
#define P4M890_IGA1_FIFO_MAX_DEPTH   96
 
#define P4M890_IGA1_FIFO_THRESHOLD   76
 
#define P4M890_IGA1_FIFO_HIGH_THRESHOLD   64
 
#define P4M890_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   32
 
#define P4M890_IGA2_FIFO_MAX_DEPTH   96
 
#define P4M890_IGA2_FIFO_THRESHOLD   76
 
#define P4M890_IGA2_FIFO_HIGH_THRESHOLD   64
 
#define P4M890_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   32
 
#define P4M900_IGA1_FIFO_MAX_DEPTH   96
 
#define P4M900_IGA1_FIFO_THRESHOLD   76
 
#define P4M900_IGA1_FIFO_HIGH_THRESHOLD   76
 
#define P4M900_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   32
 
#define P4M900_IGA2_FIFO_MAX_DEPTH   96
 
#define P4M900_IGA2_FIFO_THRESHOLD   76
 
#define P4M900_IGA2_FIFO_HIGH_THRESHOLD   76
 
#define P4M900_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   32
 
#define VX800_IGA1_FIFO_MAX_DEPTH   192
 
#define VX800_IGA1_FIFO_THRESHOLD   152
 
#define VX800_IGA1_FIFO_HIGH_THRESHOLD   152
 
#define VX800_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   64
 
#define VX800_IGA2_FIFO_MAX_DEPTH   96
 
#define VX800_IGA2_FIFO_THRESHOLD   64
 
#define VX800_IGA2_FIFO_HIGH_THRESHOLD   32
 
#define VX800_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   128
 
#define VX855_IGA1_FIFO_MAX_DEPTH   400
 
#define VX855_IGA1_FIFO_THRESHOLD   320
 
#define VX855_IGA1_FIFO_HIGH_THRESHOLD   320
 
#define VX855_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   160
 
#define VX855_IGA2_FIFO_MAX_DEPTH   200
 
#define VX855_IGA2_FIFO_THRESHOLD   160
 
#define VX855_IGA2_FIFO_HIGH_THRESHOLD   160
 
#define VX855_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   320
 
#define VX900_IGA1_FIFO_MAX_DEPTH   400
 
#define VX900_IGA1_FIFO_THRESHOLD   320
 
#define VX900_IGA1_FIFO_HIGH_THRESHOLD   320
 
#define VX900_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   160
 
#define VX900_IGA2_FIFO_MAX_DEPTH   192
 
#define VX900_IGA2_FIFO_THRESHOLD   160
 
#define VX900_IGA2_FIFO_HIGH_THRESHOLD   160
 
#define VX900_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   320
 
#define IGA1_FIFO_DEPTH_SELECT_REG_NUM   1
 
#define IGA1_FIFO_THRESHOLD_REG_NUM   2
 
#define IGA1_FIFO_HIGH_THRESHOLD_REG_NUM   2
 
#define IGA1_DISPLAY_QUEUE_EXPIRE_NUM_REG_NUM   1
 
#define IGA2_FIFO_DEPTH_SELECT_REG_NUM   3
 
#define IGA2_FIFO_THRESHOLD_REG_NUM   2
 
#define IGA2_FIFO_HIGH_THRESHOLD_REG_NUM   2
 
#define IGA2_DISPLAY_QUEUE_EXPIRE_NUM_REG_NUM   1
 
#define IGA1_FIFO_DEPTH_SELECT_FORMULA(x)   ((x/2)-1)
 
#define IGA1_FIFO_THRESHOLD_FORMULA(x)   (x/4)
 
#define IGA1_DISPLAY_QUEUE_EXPIRE_NUM_FORMULA(x)   (x/4)
 
#define IGA1_FIFO_HIGH_THRESHOLD_FORMULA(x)   (x/4)
 
#define IGA2_FIFO_DEPTH_SELECT_FORMULA(x)   (((x/2)/4)-1)
 
#define IGA2_FIFO_THRESHOLD_FORMULA(x)   (x/4)
 
#define IGA2_DISPLAY_QUEUE_EXPIRE_NUM_FORMULA(x)   (x/4)
 
#define IGA2_FIFO_HIGH_THRESHOLD_FORMULA(x)   (x/4)
 
#define LCD_POWER_SEQ_TD0   500000
 
#define LCD_POWER_SEQ_TD1   50000
 
#define LCD_POWER_SEQ_TD2   0
 
#define LCD_POWER_SEQ_TD3   210000
 
#define CLE266_POWER_SEQ_UNIT   71
 
#define K800_POWER_SEQ_UNIT   142
 
#define P880_POWER_SEQ_UNIT   572
 
#define CLE266_POWER_SEQ_FORMULA(x)   ((x)/CLE266_POWER_SEQ_UNIT)
 
#define K800_POWER_SEQ_FORMULA(x)   ((x)/K800_POWER_SEQ_UNIT)
 
#define P880_POWER_SEQ_FORMULA(x)   ((x)/P880_POWER_SEQ_UNIT)
 
#define LCD_POWER_SEQ_TD0_REG_NUM   2
 
#define LCD_POWER_SEQ_TD1_REG_NUM   2
 
#define LCD_POWER_SEQ_TD2_REG_NUM   2
 
#define LCD_POWER_SEQ_TD3_REG_NUM   2
 
#define CLE266_LCD_HOR_SCF_FORMULA(x, y)   (((x-1)*1024)/(y-1))
 
#define CLE266_LCD_VER_SCF_FORMULA(x, y)   (((x-1)*1024)/(y-1))
 
#define K800_LCD_HOR_SCF_FORMULA(x, y)   (((x-1)*4096)/(y-1))
 
#define K800_LCD_VER_SCF_FORMULA(x, y)   (((x-1)*2048)/(y-1))
 
#define LCD_HOR_SCALING_FACTOR_REG_NUM   3
 
#define LCD_VER_SCALING_FACTOR_REG_NUM   3
 
#define LCD_HOR_SCALING_FACTOR_REG_NUM_CLE   2
 
#define LCD_VER_SCALING_FACTOR_REG_NUM_CLE   2
 
#define CLE266_FUNCTION3   0x3123
 
#define KM400_FUNCTION3   0x3205
 
#define CN400_FUNCTION2   0x2259
 
#define CN400_FUNCTION3   0x3259
 
#define CN700_FUNCTION2   0x2314
 
#define CN700_FUNCTION3   0x3208
 
#define CX700_FUNCTION2   0x2324
 
#define CX700_FUNCTION3   0x3324
 
#define KM800_FUNCTION3   0x3204
 
#define KM890_FUNCTION3   0x3336
 
#define P4M890_FUNCTION3   0x3327
 
#define CN750_FUNCTION3   0x3208
 
#define P4M900_FUNCTION3   0x3364
 
#define VX800_FUNCTION3   0x3353
 
#define VX855_FUNCTION3   0x3409
 
#define VX900_FUNCTION3   0x3410
 

Functions

struct display_timing var_to_timing (const struct fb_var_screeninfo *var, u16 cxres, u16 cyres)
 
void viafb_fill_crtc_timing (const struct fb_var_screeninfo *var, u16 cxres, u16 cyres, int iga)
 
void viafb_set_vclock (u32 CLK, int set_iga)
 
void viafb_load_reg (int timing_value, int viafb_load_reg_num, struct io_register *reg, int io_type)
 
void via_set_source (u32 devices, u8 iga)
 
void via_set_state (u32 devices, u8 state)
 
void via_set_sync_polarity (u32 devices, u8 polarity)
 
u32 via_parse_odev (char *input, char **end)
 
void via_odev_to_seq (struct seq_file *m, u32 odev)
 
void init_ad9389 (void)
 
void viafb_lock_crt (void)
 
void viafb_unlock_crt (void)
 
void viafb_load_fetch_count_reg (int h_addr, int bpp_byte, int set_iga)
 
void viafb_write_regx (struct io_reg RegTable[], int ItemNum)
 
void viafb_load_FIFO_reg (int set_iga, int hor_active, int ver_active)
 
void viafb_set_dpa_gfx (int output_interface, struct GFX_DPA_SETTING *p_gfx_dpa_setting)
 
int viafb_setmode (void)
 
void viafb_fill_var_timing_info (struct fb_var_screeninfo *var, const struct fb_videomode *mode)
 
void __devinit viafb_init_chip_info (int chip_type)
 
void __devinit viafb_init_dac (int set_iga)
 
int viafb_get_refresh (int hres, int vres, u32 float_refresh)
 
void viafb_update_device_setting (int hres, int vres, int bpp, int flag)
 
void viafb_set_iga_path (void)
 
void viafb_set_primary_color_register (u8 index, u8 red, u8 green, u8 blue)
 
void viafb_set_secondary_color_register (u8 index, u8 red, u8 green, u8 blue)
 
void viafb_get_fb_info (unsigned int *fb_base, unsigned int *fb_len)
 

Variables

int viafb_SAMM_ON
 
int viafb_dual_fb
 
int viafb_LCD2_ON
 
int viafb_LCD_ON
 
int viafb_DVI_ON
 
int viafb_hotplug
 

Macro Definition Documentation

#define CLE266_FUNCTION3   0x3123

Definition at line 589 of file hw.h.

#define CLE266_LCD_HOR_SCF_FORMULA (   x,
  y 
)    (((x-1)*1024)/(y-1))

Definition at line 340 of file hw.h.

#define CLE266_LCD_VER_SCF_FORMULA (   x,
  y 
)    (((x-1)*1024)/(y-1))

Definition at line 342 of file hw.h.

#define CLE266_POWER_SEQ_FORMULA (   x)    ((x)/CLE266_POWER_SEQ_UNIT)

Definition at line 322 of file hw.h.

#define CLE266_POWER_SEQ_UNIT   71

Definition at line 316 of file hw.h.

#define CN400_FUNCTION2   0x2259

Definition at line 591 of file hw.h.

#define CN400_FUNCTION3   0x3259

Definition at line 592 of file hw.h.

#define CN700_FUNCTION2   0x2314

Definition at line 594 of file hw.h.

#define CN700_FUNCTION3   0x3208

Definition at line 595 of file hw.h.

#define CN700_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   0

Definition at line 160 of file hw.h.

#define CN700_IGA1_FIFO_HIGH_THRESHOLD   64

Definition at line 157 of file hw.h.

#define CN700_IGA1_FIFO_MAX_DEPTH   96

Definition at line 153 of file hw.h.

#define CN700_IGA1_FIFO_THRESHOLD   80

Definition at line 155 of file hw.h.

#define CN700_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   128

Definition at line 168 of file hw.h.

#define CN700_IGA2_FIFO_HIGH_THRESHOLD   32

Definition at line 166 of file hw.h.

#define CN700_IGA2_FIFO_MAX_DEPTH   96

Definition at line 162 of file hw.h.

#define CN700_IGA2_FIFO_THRESHOLD   80

Definition at line 164 of file hw.h.

#define CN750_FUNCTION3   0x3208

Definition at line 606 of file hw.h.

#define CX700_FUNCTION2   0x2324

Definition at line 597 of file hw.h.

#define CX700_FUNCTION3   0x3324

Definition at line 598 of file hw.h.

#define CX700_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   124

Definition at line 178 of file hw.h.

#define CX700_IGA1_FIFO_HIGH_THRESHOLD   128

Definition at line 176 of file hw.h.

#define CX700_IGA1_FIFO_MAX_DEPTH   192

Definition at line 172 of file hw.h.

#define CX700_IGA1_FIFO_THRESHOLD   128

Definition at line 174 of file hw.h.

#define CX700_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   128

Definition at line 187 of file hw.h.

#define CX700_IGA2_FIFO_HIGH_THRESHOLD   32

Definition at line 185 of file hw.h.

#define CX700_IGA2_FIFO_MAX_DEPTH   96

Definition at line 181 of file hw.h.

#define CX700_IGA2_FIFO_THRESHOLD   64

Definition at line 183 of file hw.h.

#define IGA1_DISPLAY_QUEUE_EXPIRE_NUM_FORMULA (   x)    (x/4)

Definition at line 296 of file hw.h.

#define IGA1_DISPLAY_QUEUE_EXPIRE_NUM_REG_NUM   1

Definition at line 287 of file hw.h.

#define IGA1_FETCH_COUNT_ALIGN_BYTE   16

Definition at line 90 of file hw.h.

#define IGA1_FETCH_COUNT_FORMULA (   x,
  y 
)    (((x*y)/IGA1_FETCH_COUNT_ALIGN_BYTE) + IGA1_FETCH_COUNT_PATCH_VALUE)

Definition at line 93 of file hw.h.

#define IGA1_FETCH_COUNT_PATCH_VALUE   4

Definition at line 92 of file hw.h.

#define IGA1_FETCH_COUNT_REG_NUM   2

Definition at line 88 of file hw.h.

#define IGA1_FIFO_DEPTH_SELECT_FORMULA (   x)    ((x/2)-1)

Definition at line 294 of file hw.h.

#define IGA1_FIFO_DEPTH_SELECT_REG_NUM   1

Definition at line 284 of file hw.h.

#define IGA1_FIFO_HIGH_THRESHOLD_FORMULA (   x)    (x/4)

Definition at line 297 of file hw.h.

#define IGA1_FIFO_HIGH_THRESHOLD_REG_NUM   2

Definition at line 286 of file hw.h.

#define IGA1_FIFO_THRESHOLD_FORMULA (   x)    (x/4)

Definition at line 295 of file hw.h.

#define IGA1_FIFO_THRESHOLD_REG_NUM   2

Definition at line 285 of file hw.h.

#define IGA1_STARTING_ADDR_REG_NUM   4

Definition at line 106 of file hw.h.

#define IGA2_DISPLAY_QUEUE_EXPIRE_NUM_FORMULA (   x)    (x/4)

Definition at line 300 of file hw.h.

#define IGA2_DISPLAY_QUEUE_EXPIRE_NUM_REG_NUM   1

Definition at line 292 of file hw.h.

#define IGA2_FETCH_COUNT_ALIGN_BYTE   16

Definition at line 98 of file hw.h.

#define IGA2_FETCH_COUNT_FORMULA (   x,
  y 
)    (((x*y)/IGA2_FETCH_COUNT_ALIGN_BYTE) + IGA2_FETCH_COUNT_PATCH_VALUE)

Definition at line 100 of file hw.h.

#define IGA2_FETCH_COUNT_PATCH_VALUE   0

Definition at line 99 of file hw.h.

#define IGA2_FETCH_COUNT_REG_NUM   2

Definition at line 97 of file hw.h.

#define IGA2_FIFO_DEPTH_SELECT_FORMULA (   x)    (((x/2)/4)-1)

Definition at line 298 of file hw.h.

#define IGA2_FIFO_DEPTH_SELECT_REG_NUM   3

Definition at line 289 of file hw.h.

#define IGA2_FIFO_HIGH_THRESHOLD_FORMULA (   x)    (x/4)

Definition at line 301 of file hw.h.

#define IGA2_FIFO_HIGH_THRESHOLD_REG_NUM   2

Definition at line 291 of file hw.h.

#define IGA2_FIFO_THRESHOLD_FORMULA (   x)    (x/4)

Definition at line 299 of file hw.h.

#define IGA2_FIFO_THRESHOLD_REG_NUM   2

Definition at line 290 of file hw.h.

#define IGA2_HOR_BLANK_END_SHADOW_FORMULA (   x,
  y 
)    (((x+y)/8)-1)

Definition at line 58 of file hw.h.

#define IGA2_HOR_TOTAL_SHADOW_FORMULA (   x)    ((x/8)-5)

Definition at line 57 of file hw.h.

#define IGA2_SHADOW_HOR_BLANK_END_REG_NUM   1

Definition at line 71 of file hw.h.

#define IGA2_SHADOW_HOR_TOTAL_REG_NUM   2

Definition at line 69 of file hw.h.

#define IGA2_SHADOW_VER_ADDR_REG_NUM   2

Definition at line 75 of file hw.h.

#define IGA2_SHADOW_VER_BLANK_END_REG_NUM   2

Definition at line 79 of file hw.h.

#define IGA2_SHADOW_VER_BLANK_START_REG_NUM   2

Definition at line 77 of file hw.h.

#define IGA2_SHADOW_VER_SYNC_END_REG_NUM   1

Definition at line 83 of file hw.h.

#define IGA2_SHADOW_VER_SYNC_START_REG_NUM   2

Definition at line 81 of file hw.h.

#define IGA2_SHADOW_VER_TOTAL_REG_NUM   2

Definition at line 73 of file hw.h.

#define IGA2_STARTING_ADDR_REG_NUM   3

Definition at line 108 of file hw.h.

#define IGA2_VER_ADDR_SHADOW_FORMULA (   x)    ((x)-1)

Definition at line 60 of file hw.h.

#define IGA2_VER_BLANK_END_SHADOW_FORMULA (   x,
  y 
)    ((x+y)-1)

Definition at line 62 of file hw.h.

#define IGA2_VER_BLANK_START_SHADOW_FORMULA (   x)    ((x)-1)

Definition at line 61 of file hw.h.

#define IGA2_VER_SYNC_END_SHADOW_FORMULA (   x,
  y 
)    (x+y)

Definition at line 64 of file hw.h.

#define IGA2_VER_SYNC_START_SHADOW_FORMULA (   x)    (x)

Definition at line 63 of file hw.h.

#define IGA2_VER_TOTAL_SHADOW_FORMULA (   x)    ((x)-2)

Definition at line 59 of file hw.h.

#define K800_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   0

Definition at line 120 of file hw.h.

#define K800_IGA1_FIFO_HIGH_THRESHOLD   296

Definition at line 117 of file hw.h.

#define K800_IGA1_FIFO_MAX_DEPTH   384

Definition at line 113 of file hw.h.

#define K800_IGA1_FIFO_THRESHOLD   328

Definition at line 115 of file hw.h.

#define K800_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   128

Definition at line 129 of file hw.h.

#define K800_IGA2_FIFO_HIGH_THRESHOLD   296

Definition at line 127 of file hw.h.

#define K800_IGA2_FIFO_MAX_DEPTH   384

Definition at line 123 of file hw.h.

#define K800_IGA2_FIFO_THRESHOLD   328

Definition at line 125 of file hw.h.

#define K800_LCD_HOR_SCF_FORMULA (   x,
  y 
)    (((x-1)*4096)/(y-1))

Definition at line 344 of file hw.h.

#define K800_LCD_VER_SCF_FORMULA (   x,
  y 
)    (((x-1)*2048)/(y-1))

Definition at line 346 of file hw.h.

#define K800_POWER_SEQ_FORMULA (   x)    ((x)/K800_POWER_SEQ_UNIT)

Definition at line 323 of file hw.h.

#define K800_POWER_SEQ_UNIT   142

Definition at line 318 of file hw.h.

#define K8M890_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   124

Definition at line 197 of file hw.h.

#define K8M890_IGA1_FIFO_HIGH_THRESHOLD   296

Definition at line 195 of file hw.h.

#define K8M890_IGA1_FIFO_MAX_DEPTH   360

Definition at line 191 of file hw.h.

#define K8M890_IGA1_FIFO_THRESHOLD   328

Definition at line 193 of file hw.h.

#define K8M890_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   124

Definition at line 206 of file hw.h.

#define K8M890_IGA2_FIFO_HIGH_THRESHOLD   296

Definition at line 204 of file hw.h.

#define K8M890_IGA2_FIFO_MAX_DEPTH   360

Definition at line 200 of file hw.h.

#define K8M890_IGA2_FIFO_THRESHOLD   328

Definition at line 202 of file hw.h.

#define KM400_FUNCTION3   0x3205

Definition at line 590 of file hw.h.

#define KM800_FUNCTION3   0x3204

Definition at line 600 of file hw.h.

#define KM890_FUNCTION3   0x3336

Definition at line 602 of file hw.h.

#define LCD_HOR_SCALING_FACTOR_REG_NUM   3

Definition at line 349 of file hw.h.

#define LCD_HOR_SCALING_FACTOR_REG_NUM_CLE   2

Definition at line 353 of file hw.h.

#define LCD_POWER_SEQ_TD0   500000

Definition at line 308 of file hw.h.

#define LCD_POWER_SEQ_TD0_REG_NUM   2

Definition at line 327 of file hw.h.

#define LCD_POWER_SEQ_TD1   50000

Definition at line 310 of file hw.h.

#define LCD_POWER_SEQ_TD1_REG_NUM   2

Definition at line 329 of file hw.h.

#define LCD_POWER_SEQ_TD2   0

Definition at line 312 of file hw.h.

#define LCD_POWER_SEQ_TD2_REG_NUM   2

Definition at line 331 of file hw.h.

#define LCD_POWER_SEQ_TD3   210000

Definition at line 314 of file hw.h.

#define LCD_POWER_SEQ_TD3_REG_NUM   2

Definition at line 333 of file hw.h.

#define LCD_VER_SCALING_FACTOR_REG_NUM   3

Definition at line 351 of file hw.h.

#define LCD_VER_SCALING_FACTOR_REG_NUM_CLE   2

Definition at line 355 of file hw.h.

#define P4M890_FUNCTION3   0x3327

Definition at line 604 of file hw.h.

#define P4M890_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   32

Definition at line 216 of file hw.h.

#define P4M890_IGA1_FIFO_HIGH_THRESHOLD   64

Definition at line 214 of file hw.h.

#define P4M890_IGA1_FIFO_MAX_DEPTH   96

Definition at line 210 of file hw.h.

#define P4M890_IGA1_FIFO_THRESHOLD   76

Definition at line 212 of file hw.h.

#define P4M890_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   32

Definition at line 224 of file hw.h.

#define P4M890_IGA2_FIFO_HIGH_THRESHOLD   64

Definition at line 222 of file hw.h.

#define P4M890_IGA2_FIFO_MAX_DEPTH   96

Definition at line 218 of file hw.h.

#define P4M890_IGA2_FIFO_THRESHOLD   76

Definition at line 220 of file hw.h.

#define P4M900_FUNCTION3   0x3364

Definition at line 608 of file hw.h.

#define P4M900_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   32

Definition at line 234 of file hw.h.

#define P4M900_IGA1_FIFO_HIGH_THRESHOLD   76

Definition at line 232 of file hw.h.

#define P4M900_IGA1_FIFO_MAX_DEPTH   96

Definition at line 228 of file hw.h.

#define P4M900_IGA1_FIFO_THRESHOLD   76

Definition at line 230 of file hw.h.

#define P4M900_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   32

Definition at line 242 of file hw.h.

#define P4M900_IGA2_FIFO_HIGH_THRESHOLD   76

Definition at line 240 of file hw.h.

#define P4M900_IGA2_FIFO_MAX_DEPTH   96

Definition at line 236 of file hw.h.

#define P4M900_IGA2_FIFO_THRESHOLD   76

Definition at line 238 of file hw.h.

#define P880_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   0

Definition at line 139 of file hw.h.

#define P880_IGA1_FIFO_HIGH_THRESHOLD   64

Definition at line 136 of file hw.h.

#define P880_IGA1_FIFO_MAX_DEPTH   192

Definition at line 132 of file hw.h.

#define P880_IGA1_FIFO_THRESHOLD   128

Definition at line 134 of file hw.h.

#define P880_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   128

Definition at line 148 of file hw.h.

#define P880_IGA2_FIFO_HIGH_THRESHOLD   32

Definition at line 146 of file hw.h.

#define P880_IGA2_FIFO_MAX_DEPTH   96

Definition at line 142 of file hw.h.

#define P880_IGA2_FIFO_THRESHOLD   64

Definition at line 144 of file hw.h.

#define P880_POWER_SEQ_FORMULA (   x)    ((x)/P880_POWER_SEQ_UNIT)

Definition at line 324 of file hw.h.

#define P880_POWER_SEQ_UNIT   572

Definition at line 320 of file hw.h.

#define VIA_CRT   0x00000010

Definition at line 39 of file hw.h.

#define VIA_DVP0   0x00000004

Definition at line 38 of file hw.h.

#define VIA_DVP1   0x00000020

Definition at line 40 of file hw.h.

#define VIA_HSYNC_NEGATIVE   0x01

Definition at line 51 of file hw.h.

#define VIA_LDVP0   0x00000001

Definition at line 36 of file hw.h.

#define VIA_LDVP1   0x00000002

Definition at line 37 of file hw.h.

#define VIA_LVDS1   0x00000040

Definition at line 41 of file hw.h.

#define VIA_LVDS2   0x00000080

Definition at line 42 of file hw.h.

#define VIA_STATE_OFF   3

Definition at line 48 of file hw.h.

#define VIA_STATE_ON   0

Definition at line 45 of file hw.h.

#define VIA_STATE_STANDBY   1

Definition at line 46 of file hw.h.

#define VIA_STATE_SUSPEND   2

Definition at line 47 of file hw.h.

#define VIA_VSYNC_NEGATIVE   0x02

Definition at line 52 of file hw.h.

#define viafb_read_reg (   p,
  i 
)    via_read_reg(p, i)

Definition at line 31 of file hw.h.

#define viafb_write_reg (   i,
  p,
  d 
)    via_write_reg(p, i, d)

Definition at line 32 of file hw.h.

#define viafb_write_reg_mask (   i,
  p,
  d,
  m 
)    via_write_reg_mask(p, i, d, m)

Definition at line 33 of file hw.h.

#define VX800_FUNCTION3   0x3353

Definition at line 610 of file hw.h.

#define VX800_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   64

Definition at line 252 of file hw.h.

#define VX800_IGA1_FIFO_HIGH_THRESHOLD   152

Definition at line 250 of file hw.h.

#define VX800_IGA1_FIFO_MAX_DEPTH   192

Definition at line 246 of file hw.h.

#define VX800_IGA1_FIFO_THRESHOLD   152

Definition at line 248 of file hw.h.

#define VX800_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   128

Definition at line 260 of file hw.h.

#define VX800_IGA2_FIFO_HIGH_THRESHOLD   32

Definition at line 258 of file hw.h.

#define VX800_IGA2_FIFO_MAX_DEPTH   96

Definition at line 254 of file hw.h.

#define VX800_IGA2_FIFO_THRESHOLD   64

Definition at line 256 of file hw.h.

#define VX855_FUNCTION3   0x3409

Definition at line 612 of file hw.h.

#define VX855_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   160

Definition at line 266 of file hw.h.

#define VX855_IGA1_FIFO_HIGH_THRESHOLD   320

Definition at line 265 of file hw.h.

#define VX855_IGA1_FIFO_MAX_DEPTH   400

Definition at line 263 of file hw.h.

#define VX855_IGA1_FIFO_THRESHOLD   320

Definition at line 264 of file hw.h.

#define VX855_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   320

Definition at line 271 of file hw.h.

#define VX855_IGA2_FIFO_HIGH_THRESHOLD   160

Definition at line 270 of file hw.h.

#define VX855_IGA2_FIFO_MAX_DEPTH   200

Definition at line 268 of file hw.h.

#define VX855_IGA2_FIFO_THRESHOLD   160

Definition at line 269 of file hw.h.

#define VX900_FUNCTION3   0x3410

Definition at line 614 of file hw.h.

#define VX900_IGA1_DISPLAY_QUEUE_EXPIRE_NUM   160

Definition at line 277 of file hw.h.

#define VX900_IGA1_FIFO_HIGH_THRESHOLD   320

Definition at line 276 of file hw.h.

#define VX900_IGA1_FIFO_MAX_DEPTH   400

Definition at line 274 of file hw.h.

#define VX900_IGA1_FIFO_THRESHOLD   320

Definition at line 275 of file hw.h.

#define VX900_IGA2_DISPLAY_QUEUE_EXPIRE_NUM   320

Definition at line 282 of file hw.h.

#define VX900_IGA2_FIFO_HIGH_THRESHOLD   160

Definition at line 281 of file hw.h.

#define VX900_IGA2_FIFO_MAX_DEPTH   192

Definition at line 279 of file hw.h.

#define VX900_IGA2_FIFO_THRESHOLD   160

Definition at line 280 of file hw.h.

Function Documentation

void init_ad9389 ( void  )
struct display_timing var_to_timing ( const struct fb_var_screeninfo var,
u16  cxres,
u16  cyres 
)
read

Definition at line 1470 of file hw.c.

void via_odev_to_seq ( struct seq_file m,
u32  odev 
)

Definition at line 938 of file hw.c.

u32 via_parse_odev ( char input,
char **  end 
)

Definition at line 912 of file hw.c.

void via_set_source ( u32  devices,
u8  iga 
)

Definition at line 761 of file hw.c.

void via_set_state ( u32  devices,
u8  state 
)

Definition at line 875 of file hw.c.

void via_set_sync_polarity ( u32  devices,
u8  polarity 
)

Definition at line 894 of file hw.c.

void viafb_fill_crtc_timing ( const struct fb_var_screeninfo var,
u16  cxres,
u16  cyres,
int  iga 
)

Definition at line 1491 of file hw.c.

void viafb_fill_var_timing_info ( struct fb_var_screeninfo var,
const struct fb_videomode mode 
)

Definition at line 2121 of file hw.c.

void viafb_get_fb_info ( unsigned int fb_base,
unsigned int fb_len 
)
int viafb_get_refresh ( int  hres,
int  vres,
u32  float_refresh 
)

Definition at line 2013 of file hw.c.

void __devinit viafb_init_chip_info ( int  chip_type)

Definition at line 1510 of file hw.c.

void __devinit viafb_init_dac ( int  set_iga)

Definition at line 1675 of file hw.c.

void viafb_load_fetch_count_reg ( int  h_addr,
int  bpp_byte,
int  set_iga 
)

Definition at line 1027 of file hw.c.

void viafb_load_FIFO_reg ( int  set_iga,
int  hor_active,
int  ver_active 
)

Definition at line 1052 of file hw.c.

void viafb_load_reg ( int  timing_value,
int  viafb_load_reg_num,
struct io_register reg,
int  io_type 
)

Definition at line 979 of file hw.c.

void viafb_lock_crt ( void  )

Definition at line 479 of file hw.c.

void viafb_set_dpa_gfx ( int  output_interface,
struct GFX_DPA_SETTING p_gfx_dpa_setting 
)

Definition at line 2061 of file hw.c.

void viafb_set_iga_path ( void  )

Definition at line 559 of file hw.c.

void viafb_set_primary_color_register ( u8  index,
u8  red,
u8  green,
u8  blue 
)

Definition at line 681 of file hw.c.

void viafb_set_secondary_color_register ( u8  index,
u8  red,
u8  green,
u8  blue 
)

Definition at line 687 of file hw.c.

void viafb_set_vclock ( u32  CLK,
int  set_iga 
)

Definition at line 1457 of file hw.c.

int viafb_setmode ( void  )

Definition at line 1834 of file hw.c.

void viafb_unlock_crt ( void  )

Definition at line 484 of file hw.c.

void viafb_update_device_setting ( int  hres,
int  vres,
int  bpp,
int  flag 
)

Definition at line 1528 of file hw.c.

void viafb_write_regx ( struct io_reg  RegTable[],
int  ItemNum 
)

Definition at line 1016 of file hw.c.

Variable Documentation

int viafb_dual_fb

Definition at line 37 of file global.c.

int viafb_DVI_ON

Definition at line 33 of file global.c.

int viafb_hotplug

Definition at line 27 of file global.c.

int viafb_LCD2_ON

Definition at line 35 of file global.c.

int viafb_LCD_ON

Definition at line 34 of file global.c.

int viafb_SAMM_ON

Definition at line 36 of file global.c.