viafb support for VX855
RFC PATCH 1/1 viafb support for VX855
Hi Joseph and Scott,
Today I've played a bit with viafb on a VX855 board, hacked up the following patch and got it to the point where the CRT output seems to be working just fine. I had no chance to test LVDS panel, TV out or DVI yet.
As you can see from the #if0 / #endif parts in the code, it is not ready for mainline yet.
Nonetheless, right now is the right time to finish VX855 support and push it for mainline inclusion, to make sure that the code is in mainline before there are large quantities of VX855 based products in the hands of the end user.
So Joseph/Scott: What is your idea on VX855 support? When should it be merged? Do you have additions/corrections to my patch below?
Regards,
Harald
drivers/video/via/chip.h +3 -0
@@ -68,6 +68,9 @@#define UNICHROME_VX800 11#define UNICHROME_VX800_DID 0x1122 +#define UNICHROME_VX855 12 +#define UNICHROME_VX855_DID 0x5122 +/**************************************************/ /* Definition TMDS Trasmitter Information */ /**************************************************/
drivers/video/via/hw.c +140 -68
294 lines not on this page · raw message
drivers/video/via/hw.h +14 -0
@@ -335,6 +335,17 @@ is reserved, so it may have problem to set 1600x1200 on IGA2. *//* location: {CR94,0,6} */ #define VX800_IGA2_DISPLAY_QUEUE_EXPIRE_NUM 128 +/* For VT3409 */ +#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 IGA1_FIFO_DEPTH_SELECT_REG_NUM 1#define IGA1_FIFO_THRESHOLD_REG_NUM 2#define IGA1_FIFO_HIGH_THRESHOLD_REG_NUM 2
@@ -716,6 +727,7 @@ struct pll_map {u32 cle266_pll;u32 k800_pll;u32 cx700_pll; +u32 vx855_pll; };struct rgbLUT {
@@ -860,6 +872,8 @@ struct iga2_crtc_timing {#define P4M900_FUNCTION3 0x3364/* VT3353 chipset*/ #define VX800_FUNCTION3 0x3353 +/* VT3409 chipset*/ +#define VX855_FUNCTION3 0x3409#define NUM_TOTAL_PLL_TABLE ARRAY_SIZE(pll_value)
drivers/video/via/share.h +98 -0
110 lines not on this page · raw message
drivers/video/via/viafbdev.c +5 -2
@@ -218,7 +218,8 @@ static int viafb_check_var(struct fb_var_screeninfo *var,if (!info->par)return -1 ; p_viafb_par = (struct viafb_par *)info->par; -if (p_viafb_par->chip_info->gfx_chip_name ==UNICHROME_VX800 ) +if (p_viafb_par->chip_info->gfx_chip_name ==UNICHROME_VX800 || + p_viafb_par->chip_info->gfx_chip_name ==UNICHROME_VX855 ) var->accel_flags =0 ;return 0 ;
@@ -1162,8 +1163,10 @@ static int viafb_cursor(struct fb_info *info, struct fb_cursor *cursor)if ((p_viafb_par->chip_info->gfx_chip_name ==UNICHROME_CX700 ) || + (p_viafb_par->chip_info->gfx_chip_name == +UNICHROME_VX800 ) || ((p_viafb_par->chip_info->gfx_chip_name == -UNICHROME_VX800 ))) { +UNICHROME_VX855 ))) { bg_col = (((info->cmap.red)[viacursor.image.bg_color] & 0xFFC0) << 14) |
drivers/video/via/viamode.c +55 -0
61 lines not on this page · raw message
drivers/video/via/viamode.h +2 -0
@@ -57,6 +57,7 @@ struct res_map_refresh {#define NUM_TOTAL_KM400_ModeXregs ARRAY_SIZE(KM400_ModeXregs)#define NUM_TOTAL_CX700_ModeXregs ARRAY_SIZE(CX700_ModeXregs)#define NUM_TOTAL_VX800_ModeXregs ARRAY_SIZE(VX800_ModeXregs) +#define NUM_TOTAL_VX855_ModeXregs ARRAY_SIZE(VX855_ModeXregs)#define NUM_TOTAL_CLE266_ModeXregs ARRAY_SIZE(CLE266_ModeXregs)#define NUM_TOTAL_PATCH_MODE ARRAY_SIZE(res_patch_table)#define NUM_TOTAL_MODETABLE ARRAY_SIZE(CLE266Modes)
@@ -170,6 +171,7 @@ extern struct io_reg CN700_ModeXregs[66];extern struct io_reg KM400_ModeXregs[55 ];extern struct io_reg CX700_ModeXregs[58 ];extern struct io_reg VX800_ModeXregs[58 ]; +extern struct io_reg VX855_ModeXregs[52 ];extern struct io_reg CLE266_ModeXregs[32 ];extern struct io_reg PM1024x768[2 ];extern struct patch_table res_patch_table[1 ];
Signature · 10 lines
- Harald Welte <[email protected]> http://linux.via.com.tw/ ============================================================================ VIA Open Source Liaison ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com