Commit 949eb0ae authored by Miguel Gómez's avatar Miguel Gómez Committed by Greg Kroah-Hartman

Staging: xgifb: Comment cleaning.

Remove commented code and useless comments. Leave only those with relevant
hints to the code.
Signed-off-by: default avatarMiguel Gómez <magomez@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f12db36d
...@@ -68,9 +68,6 @@ static int XGIfb_crt2type = -1; ...@@ -68,9 +68,6 @@ static int XGIfb_crt2type = -1;
/* PR: Tv plug type (for overriding autodetection) */ /* PR: Tv plug type (for overriding autodetection) */
static int XGIfb_tvplug = -1; static int XGIfb_tvplug = -1;
/* TW: For ioctl XGIFB_GET_INFO */
/* XGIfb_info XGIfbinfo; */
#define MD_XGI315 1 #define MD_XGI315 1
/* mode table */ /* mode table */
...@@ -240,7 +237,6 @@ static const struct _chswtable { ...@@ -240,7 +237,6 @@ static const struct _chswtable {
{ 0, 0, "" , "" } { 0, 0, "" , "" }
}; };
/* Eden Chen */
static const struct _XGI_TV_filter { static const struct _XGI_TV_filter {
u8 filter[9][4]; u8 filter[9][4];
} XGI_TV_filter[] = { } XGI_TV_filter[] = {
......
...@@ -36,36 +36,6 @@ static void dumpVGAReg(void) ...@@ -36,36 +36,6 @@ static void dumpVGAReg(void)
u8 i, reg; u8 i, reg;
xgifb_reg_set(XGISR, 0x05, 0x86); xgifb_reg_set(XGISR, 0x05, 0x86);
/*
xgifb_reg_set(XGISR, 0x08, 0x4f);
xgifb_reg_set(XGISR, 0x0f, 0x20);
xgifb_reg_set(XGISR, 0x11, 0x4f);
xgifb_reg_set(XGISR, 0x13, 0x45);
xgifb_reg_set(XGISR, 0x14, 0x51);
xgifb_reg_set(XGISR, 0x1e, 0x41);
xgifb_reg_set(XGISR, 0x1f, 0x0);
xgifb_reg_set(XGISR, 0x20, 0xa1);
xgifb_reg_set(XGISR, 0x22, 0xfb);
xgifb_reg_set(XGISR, 0x26, 0x22);
xgifb_reg_set(XGISR, 0x3e, 0x07);
*/
/* xgifb_reg_set(XGICR, 0x19, 0x00); */
/* xgifb_reg_set(XGICR, 0x1a, 0x3C); */
/* xgifb_reg_set(XGICR, 0x22, 0xff); */
/* xgifb_reg_set(XGICR, 0x3D, 0x10); */
/* xgifb_reg_set(XGICR, 0x4a, 0xf3); */
/* xgifb_reg_set(XGICR, 0x57, 0x0); */
/* xgifb_reg_set(XGICR, 0x7a, 0x2c); */
/* xgifb_reg_set(XGICR, 0x82, 0xcc); */
/* xgifb_reg_set(XGICR, 0x8c, 0x0); */
/*
xgifb_reg_set(XGICR, 0x99, 0x1);
xgifb_reg_set(XGICR, 0x41, 0x40);
*/
for (i = 0; i < 0x4f; i++) { for (i = 0; i < 0x4f; i++) {
reg = xgifb_reg_get(XGISR, i); reg = xgifb_reg_get(XGISR, i);
...@@ -78,30 +48,6 @@ static void dumpVGAReg(void) ...@@ -78,30 +48,6 @@ static void dumpVGAReg(void)
pr_debug("\no 3d4 %x", i); pr_debug("\no 3d4 %x", i);
pr_debug("\ni 3d5 => %x", reg); pr_debug("\ni 3d5 => %x", reg);
} }
/*
xgifb_reg_set(XGIPART1,0x2F,1);
for (i=1; i < 0x50; i++) {
reg = xgifb_reg_get(XGIPART1, i);
pr_debug("\no d004 %x", i);
pr_debug("\ni d005 => %x", reg);
}
for (i=0; i < 0x50; i++) {
reg = xgifb_reg_get(XGIPART2, i);
pr_debug("\no d010 %x", i);
pr_debug("\ni d011 => %x", reg);
}
for (i=0; i < 0x50; i++) {
reg = xgifb_reg_get(XGIPART3, i);
pr_debug("\no d012 %x",i);
pr_debug("\ni d013 => %x",reg);
}
for (i=0; i < 0x50; i++) {
reg = xgifb_reg_get(XGIPART4, i);
pr_debug("\no d014 %x",i);
pr_debug("\ni d015 => %x",reg);
}
*/
} }
#else #else
static inline void dumpVGAReg(void) static inline void dumpVGAReg(void)
...@@ -215,15 +161,6 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, ...@@ -215,15 +161,6 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
| ((unsigned short) (sr_data & 0x01) << 10); | ((unsigned short) (sr_data & 0x01) << 10);
A = VT + 2; A = VT + 2;
/* cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[10]; */
/* Vertical display enable end */
/*
VDE = (cr_data & 0xff) |
((unsigned short) (cr_data2 & 0x02) << 7) |
((unsigned short) (cr_data2 & 0x40) << 3) |
((unsigned short) (sr_data & 0x02) << 9);
*/
VDE = XGI_Pr->RefIndex[RefreshRateTableIndex].YRes - 1; VDE = XGI_Pr->RefIndex[RefreshRateTableIndex].YRes - 1;
E = VDE + 1; E = VDE + 1;
...@@ -590,7 +527,7 @@ static int XGIfb_validate_mode(struct xgifb_video_info *xgifb_info, int myindex) ...@@ -590,7 +527,7 @@ static int XGIfb_validate_mode(struct xgifb_video_info *xgifb_info, int myindex)
if (XGIbios_mode[myindex].yres != 576) if (XGIbios_mode[myindex].yres != 576)
return -1; return -1;
} }
/* TW: LVDS/CHRONTEL does not support 720 */ /* LVDS/CHRONTEL does not support 720 */
if (xgifb_info->hasVB == HASVB_LVDS_CHRONTEL || if (xgifb_info->hasVB == HASVB_LVDS_CHRONTEL ||
xgifb_info->hasVB == HASVB_CHRONTEL) { xgifb_info->hasVB == HASVB_CHRONTEL) {
return -1; return -1;
...@@ -794,26 +731,25 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info) ...@@ -794,26 +731,25 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info)
{ {
u8 reg; u8 reg;
unsigned char doit = 1; unsigned char doit = 1;
/*
xgifb_reg_set(XGISR,IND_SIS_PASSWORD,SIS_PASSWORD);
xgifb_reg_set(XGICR, 0x13, 0x00);
xgifb_reg_and_or(XGISR,0x0E, 0xF0, 0x01);
*test*
*/
if (xgifb_info->video_bpp == 8) { if (xgifb_info->video_bpp == 8) {
/* TW: We can't switch off CRT1 on LVDS/Chrontel /*
* in 8bpp Modes */ * We can't switch off CRT1 on LVDS/Chrontel
* in 8bpp Modes
*/
if ((xgifb_info->hasVB == HASVB_LVDS) || if ((xgifb_info->hasVB == HASVB_LVDS) ||
(xgifb_info->hasVB == HASVB_LVDS_CHRONTEL)) { (xgifb_info->hasVB == HASVB_LVDS_CHRONTEL)) {
doit = 0; doit = 0;
} }
/* TW: We can't switch off CRT1 on 301B-DH /*
* in 8bpp Modes if using LCD */ * We can't switch off CRT1 on 301B-DH
* in 8bpp Modes if using LCD
*/
if (xgifb_info->display2 == XGIFB_DISP_LCD) if (xgifb_info->display2 == XGIFB_DISP_LCD)
doit = 0; doit = 0;
} }
/* TW: We can't switch off CRT1 if bridge is in slave mode */ /* We can't switch off CRT1 if bridge is in slave mode */
if (xgifb_info->hasVB != HASVB_NONE) { if (xgifb_info->hasVB != HASVB_NONE) {
reg = xgifb_reg_get(XGIPART1, 0x00); reg = xgifb_reg_get(XGIPART1, 0x00);
...@@ -1038,7 +974,6 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive, ...@@ -1038,7 +974,6 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
unsigned int drate = 0, hrate = 0; unsigned int drate = 0, hrate = 0;
int found_mode = 0; int found_mode = 0;
int old_mode; int old_mode;
/* unsigned char reg, reg1; */
info->var.xres_virtual = var->xres_virtual; info->var.xres_virtual = var->xres_virtual;
info->var.yres_virtual = var->yres_virtual; info->var.yres_virtual = var->yres_virtual;
...@@ -1049,8 +984,6 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive, ...@@ -1049,8 +984,6 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
else if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) else if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE)
vtotal <<= 2; vtotal <<= 2;
else if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) { else if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) {
/* vtotal <<= 1; */
/* var->yres <<= 1; */
} }
if (!htotal || !vtotal) { if (!htotal || !vtotal) {
...@@ -1388,16 +1321,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -1388,16 +1321,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
xgifb_info->refresh_rate = 60; xgifb_info->refresh_rate = 60;
} }
/* /* Calculation wrong for 1024x600 - force it to 60Hz */
if ((var->pixclock) && (htotal)) {
drate = 1E12 / var->pixclock;
hrate = drate / htotal;
refresh_rate = (unsigned int) (hrate / vtotal * 2 + 0.5);
} else {
refresh_rate = 60;
}
*/
/* TW: Calculation wrong for 1024x600 - force it to 60Hz */
if ((var->xres == 1024) && (var->yres == 600)) if ((var->xres == 1024) && (var->yres == 600))
refresh_rate = 60; refresh_rate = 60;
...@@ -1446,8 +1370,6 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -1446,8 +1370,6 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
} }
} }
/* TW: TODO: Check the refresh rate */
/* Adapt RGB settings */ /* Adapt RGB settings */
XGIfb_bpp_to_var(xgifb_info, var); XGIfb_bpp_to_var(xgifb_info, var);
...@@ -1462,16 +1384,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -1462,16 +1384,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
var->xres_virtual = var->xres; var->xres_virtual = var->xres;
if (var->yres != var->yres_virtual) if (var->yres != var->yres_virtual)
var->yres_virtual = var->yres; var->yres_virtual = var->yres;
} /* else { */ }
/* TW: Now patch yres_virtual if we use panning */
/* May I do this? */
/* var->yres_virtual = xgifb_info->heapstart /
(var->xres * (var->bits_per_pixel >> 3)); */
/* if (var->yres_virtual <= var->yres) { */
/* TW: Paranoia check */
/* var->yres_virtual = var->yres; */
/* } */
/* } */
/* Truncate offsets to maximum if too high */ /* Truncate offsets to maximum if too high */
if (var->xoffset > var->xres_virtual - var->xres) if (var->xoffset > var->xres_virtual - var->xres)
...@@ -1553,7 +1466,6 @@ static struct fb_ops XGIfb_ops = { ...@@ -1553,7 +1466,6 @@ static struct fb_ops XGIfb_ops = {
.fb_fillrect = cfb_fillrect, .fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea, .fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit, .fb_imageblit = cfb_imageblit,
/* .fb_mmap = XGIfb_mmap, */
}; };
/* ---------------- Chip generation dependent routines ---------------- */ /* ---------------- Chip generation dependent routines ---------------- */
...@@ -1630,9 +1542,6 @@ static int XGIfb_get_dram_size(struct xgifb_video_info *xgifb_info) ...@@ -1630,9 +1542,6 @@ static int XGIfb_get_dram_size(struct xgifb_video_info *xgifb_info)
} }
xgifb_info->video_size = xgifb_info->video_size * ChannelNum; xgifb_info->video_size = xgifb_info->video_size * ChannelNum;
/* PLiad fixed for benchmarking and fb set */
/* xgifb_info->video_size = 0x200000; */ /* 1024x768x16 */
/* xgifb_info->video_size = 0x1000000; */ /* benchmark */
pr_info("SR14=%x DramSzie %x ChannelNum %x\n", pr_info("SR14=%x DramSzie %x ChannelNum %x\n",
reg, reg,
...@@ -1680,7 +1589,7 @@ static void XGIfb_detect_VB(struct xgifb_video_info *xgifb_info) ...@@ -1680,7 +1589,7 @@ static void XGIfb_detect_VB(struct xgifb_video_info *xgifb_info)
} }
if (XGIfb_tvplug != -1) if (XGIfb_tvplug != -1)
/* PR/TW: Override with option */ /* Override with option */
xgifb_info->TV_plug = XGIfb_tvplug; xgifb_info->TV_plug = XGIfb_tvplug;
else if (cr32 & SIS_VB_HIVISION) { else if (cr32 & SIS_VB_HIVISION) {
xgifb_info->TV_type = TVMODE_HIVISION; xgifb_info->TV_type = TVMODE_HIVISION;
...@@ -1700,7 +1609,7 @@ static void XGIfb_detect_VB(struct xgifb_video_info *xgifb_info) ...@@ -1700,7 +1609,7 @@ static void XGIfb_detect_VB(struct xgifb_video_info *xgifb_info)
xgifb_info->TV_type = TVMODE_NTSC; xgifb_info->TV_type = TVMODE_NTSC;
} }
/* TW: Copy forceCRT1 option to CRT1off if option is given */ /* Copy forceCRT1 option to CRT1off if option is given */
if (XGIfb_forcecrt1 != -1) { if (XGIfb_forcecrt1 != -1) {
if (XGIfb_forcecrt1) if (XGIfb_forcecrt1)
XGIfb_crt1off = 0; XGIfb_crt1off = 0;
...@@ -1794,7 +1703,7 @@ static int __init XGIfb_setup(char *options) ...@@ -1794,7 +1703,7 @@ static int __init XGIfb_setup(char *options)
XGIfb_search_tvstd(this_opt + 7); XGIfb_search_tvstd(this_opt + 7);
} else if (!strncmp(this_opt, "dstn", 4)) { } else if (!strncmp(this_opt, "dstn", 4)) {
enable_dstn = 1; enable_dstn = 1;
/* TW: DSTN overrules forcecrt2type */ /* DSTN overrules forcecrt2type */
XGIfb_crt2type = XGIFB_DISP_LCD; XGIfb_crt2type = XGIFB_DISP_LCD;
} else if (!strncmp(this_opt, "noypan", 6)) { } else if (!strncmp(this_opt, "noypan", 6)) {
XGIfb_ypan = 0; XGIfb_ypan = 0;
...@@ -1981,13 +1890,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -1981,13 +1890,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
dev_info(&pdev->dev, dev_info(&pdev->dev,
"XGI301LV bridge detected (revision 0x%02x)\n", "XGI301LV bridge detected (revision 0x%02x)\n",
reg); reg);
} } else {
/* else if (reg >= 0xB0) {
hw_info->ujVBChipID = VB_CHIP_301B;
reg1 = xgifb_reg_get(XGIPART4, 0x23);
pr_debug("XGIfb: XGI301B bridge detected\n");
} */
else {
hw_info->ujVBChipID = VB_CHIP_301; hw_info->ujVBChipID = VB_CHIP_301;
dev_info(&pdev->dev, "XGI301 bridge detected\n"); dev_info(&pdev->dev, "XGI301 bridge detected\n");
} }
...@@ -2104,7 +2007,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -2104,7 +2007,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
goto error_1; goto error_1;
} }
/* yilin set default refresh rate */ /* set default refresh rate */
xgifb_info->refresh_rate = refresh_rate; xgifb_info->refresh_rate = refresh_rate;
if (xgifb_info->refresh_rate == 0) if (xgifb_info->refresh_rate == 0)
xgifb_info->refresh_rate = 60; xgifb_info->refresh_rate = 60;
......
...@@ -30,13 +30,13 @@ enum xgi_tvtype { ...@@ -30,13 +30,13 @@ enum xgi_tvtype {
TVMODE_NTSC = 0, TVMODE_NTSC = 0,
TVMODE_PAL, TVMODE_PAL,
TVMODE_HIVISION, TVMODE_HIVISION,
TVTYPE_PALM, /* vicki@030226 */ TVTYPE_PALM,
TVTYPE_PALN, /* vicki@030226 */ TVTYPE_PALN,
TVTYPE_NTSCJ, /* vicki@030226 */ TVTYPE_NTSCJ,
TVMODE_TOTAL TVMODE_TOTAL
}; };
enum xgi_tv_plug { /* vicki@030226 */ enum xgi_tv_plug {
TVPLUG_UNKNOWN = 0, TVPLUG_UNKNOWN = 0,
TVPLUG_COMPOSITE = 1, TVPLUG_COMPOSITE = 1,
TVPLUG_SVIDEO = 2, TVPLUG_SVIDEO = 2,
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/xgi/initdef.h
* ,v 1.4 2000/12/02 01:16:17 dawes Exp $*/
#ifndef _VB_DEF_ #ifndef _VB_DEF_
#define _VB_DEF_ #define _VB_DEF_
#include "../../video/sis/initdef.h" #include "../../video/sis/initdef.h"
...@@ -12,7 +10,6 @@ ...@@ -12,7 +10,6 @@
#define SetCHTVOverScan 0x8000 #define SetCHTVOverScan 0x8000
#define Panel_320x480 0x07 /*fstn*/ #define Panel_320x480 0x07 /*fstn*/
/* [ycchen] 02/12/03 Modify for Multi-Sync. LCD Support */
#define PanelResInfo 0x1F /* CR36 Panel Type/LCDResInfo */ #define PanelResInfo 0x1F /* CR36 Panel Type/LCDResInfo */
#define Panel_1024x768x75 0x22 #define Panel_1024x768x75 0x22
#define Panel_1280x1024x75 0x23 #define Panel_1280x1024x75 0x23
......
This diff is collapsed.
...@@ -1859,7 +1859,6 @@ static void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo, ...@@ -1859,7 +1859,6 @@ static void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo,
i++; i++;
} }
/* 07/05/22 */
if (table == 0x04) { if (table == 0x04) {
switch (tempdi[i].DATAPTR) { switch (tempdi[i].DATAPTR) {
case 0: case 0:
...@@ -2519,7 +2518,7 @@ static void XGI_UpdateModeInfo(struct xgi_hw_device_info *HwDeviceExtension, ...@@ -2519,7 +2518,7 @@ static void XGI_UpdateModeInfo(struct xgi_hw_device_info *HwDeviceExtension,
temp &= 0x0f; temp &= 0x0f;
if (!(temp == 0x08)) { if (!(temp == 0x08)) {
/* Check ChannelA by Part1_13 [2003/10/03] */ /* Check ChannelA */
tempax = xgifb_reg_get(pVBInfo->Part1Port, 0x13); tempax = xgifb_reg_get(pVBInfo->Part1Port, 0x13);
if (tempax & 0x04) if (tempax & 0x04)
tempcl = tempcl | ActiveLCD; tempcl = tempcl | ActiveLCD;
...@@ -2675,7 +2674,6 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2675,7 +2674,6 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
} }
if (pVBInfo->IF_DEF_YPbPr == 1) { if (pVBInfo->IF_DEF_YPbPr == 1) {
/* [Billy] 07/05/04 */
if (((pVBInfo->IF_DEF_LVDS == 0) && if (((pVBInfo->IF_DEF_LVDS == 0) &&
((pVBInfo->VBType & VB_SIS301LV) || ((pVBInfo->VBType & VB_SIS301LV) ||
(pVBInfo->VBType & VB_SIS302LV) || (pVBInfo->VBType & VB_SIS302LV) ||
...@@ -2927,7 +2925,7 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeNo, ...@@ -2927,7 +2925,7 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeNo,
if (tempbx == 0) if (tempbx == 0)
tempbx = Panel_1024x768; /* default */ tempbx = Panel_1024x768; /* default */
/* LCD75 [2003/8/22] Vicent */ /* LCD75 */
if ((tempbx == Panel_1024x768) || (tempbx == Panel_1280x1024)) { if ((tempbx == Panel_1024x768) || (tempbx == Panel_1280x1024)) {
if (pVBInfo->VBInfo & DriverMode) { if (pVBInfo->VBInfo & DriverMode) {
tempax = xgifb_reg_get(pVBInfo->P3d4, 0x33); tempax = xgifb_reg_get(pVBInfo->P3d4, 0x33);
...@@ -4591,7 +4589,7 @@ static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -4591,7 +4589,7 @@ static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex,
} }
} }
/* [ycchen] 01/14/03 Modify for 301C PALM Support */ /* Modify for 301C PALM Support */
if (pVBInfo->VBType & VB_XGI301C) { if (pVBInfo->VBType & VB_XGI301C) {
if (pVBInfo->TVInfo & TVSetPALM) if (pVBInfo->TVInfo & TVSetPALM)
xgifb_reg_and_or(pVBInfo->Part2Port, 0x4E, ~0x08, xgifb_reg_and_or(pVBInfo->Part2Port, 0x4E, ~0x08,
...@@ -6245,8 +6243,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, ...@@ -6245,8 +6243,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
(pVBInfo->RefIndex[RefreshRateTableIndex].YRes == 600)) { (pVBInfo->RefIndex[RefreshRateTableIndex].YRes == 600)) {
index++; index++;
} }
/* Alan 10/19/2007; /* do the similar adjustment like XGISearchCRT1Rate() */
* do the similar adjustment like XGISearchCRT1Rate() */
if ((pVBInfo->RefIndex[RefreshRateTableIndex].XRes == 1024) && if ((pVBInfo->RefIndex[RefreshRateTableIndex].XRes == 1024) &&
(pVBInfo->RefIndex[RefreshRateTableIndex].YRes == 768)) { (pVBInfo->RefIndex[RefreshRateTableIndex].YRes == 768)) {
index++; index++;
...@@ -6354,7 +6351,7 @@ void XGI_SenseCRT1(struct vb_device_info *pVBInfo) ...@@ -6354,7 +6351,7 @@ void XGI_SenseCRT1(struct vb_device_info *pVBInfo)
int i; int i;
xgifb_reg_set(pVBInfo->P3c4, 0x05, 0x86); xgifb_reg_set(pVBInfo->P3c4, 0x05, 0x86);
/* [2004/05/06] Vicent to fix XG42 single LCD sense to CRT+LCD */ /* to fix XG42 single LCD sense to CRT+LCD */
xgifb_reg_set(pVBInfo->P3d4, 0x57, 0x4A); xgifb_reg_set(pVBInfo->P3d4, 0x57, 0x4A);
xgifb_reg_set(pVBInfo->P3d4, 0x53, (unsigned char) (xgifb_reg_get( xgifb_reg_set(pVBInfo->P3d4, 0x53, (unsigned char) (xgifb_reg_get(
pVBInfo->P3d4, 0x53) | 0x02)); pVBInfo->P3d4, 0x53) | 0x02));
...@@ -6419,7 +6416,7 @@ void XGI_SenseCRT1(struct vb_device_info *pVBInfo) ...@@ -6419,7 +6416,7 @@ void XGI_SenseCRT1(struct vb_device_info *pVBInfo)
else else
xgifb_reg_and_or(pVBInfo->P3d4, 0x32, 0xDF, 0x00); xgifb_reg_and_or(pVBInfo->P3d4, 0x32, 0xDF, 0x00);
/* alan, avoid display something, set BLACK DAC if not restore DAC */ /* avoid display something, set BLACK DAC if not restore DAC */
outb(0x00, pVBInfo->P3c8); outb(0x00, pVBInfo->P3c8);
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
...@@ -6432,7 +6429,6 @@ void XGI_SenseCRT1(struct vb_device_info *pVBInfo) ...@@ -6432,7 +6429,6 @@ void XGI_SenseCRT1(struct vb_device_info *pVBInfo)
xgifb_reg_set(pVBInfo->P3d4, 0x63, CR63); xgifb_reg_set(pVBInfo->P3d4, 0x63, CR63);
xgifb_reg_set(pVBInfo->P3c4, 0x31, SR31); xgifb_reg_set(pVBInfo->P3c4, 0x31, SR31);
/* [2004/05/11] Vicent */
xgifb_reg_set(pVBInfo->P3d4, 0x53, (unsigned char) (xgifb_reg_get( xgifb_reg_set(pVBInfo->P3d4, 0x53, (unsigned char) (xgifb_reg_get(
pVBInfo->P3d4, 0x53) & 0xFD)); pVBInfo->P3d4, 0x53) & 0xFD));
xgifb_reg_set(pVBInfo->P3c4, 0x1F, (unsigned char) SR1F); xgifb_reg_set(pVBInfo->P3c4, 0x1F, (unsigned char) SR1F);
...@@ -6653,7 +6649,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -6653,7 +6649,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
pVBInfo->IF_DEF_LVDS = 0; pVBInfo->IF_DEF_LVDS = 0;
pVBInfo->IF_DEF_LCDA = 1; pVBInfo->IF_DEF_LCDA = 1;
if (HwDeviceExtension->jChipType >= XG20) { /* kuku 2004/06/25 */ if (HwDeviceExtension->jChipType >= XG20) {
pVBInfo->IF_DEF_YPbPr = 0; pVBInfo->IF_DEF_YPbPr = 0;
pVBInfo->IF_DEF_HiVision = 0; pVBInfo->IF_DEF_HiVision = 0;
pVBInfo->IF_DEF_CRT2Monitor = 0; pVBInfo->IF_DEF_CRT2Monitor = 0;
...@@ -6695,7 +6691,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -6695,7 +6691,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
} }
} }
if (HwDeviceExtension->jChipType < XG20) /* kuku 2004/06/25 */ if (HwDeviceExtension->jChipType < XG20)
XGI_GetVBType(pVBInfo); XGI_GetVBType(pVBInfo);
InitTo330Pointer(HwDeviceExtension->jChipType, pVBInfo); InitTo330Pointer(HwDeviceExtension->jChipType, pVBInfo);
...@@ -6703,12 +6699,12 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -6703,12 +6699,12 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
ModeNo = ModeNo & 0x7F; ModeNo = ModeNo & 0x7F;
xgifb_reg_set(pVBInfo->P3c4, 0x05, 0x86); xgifb_reg_set(pVBInfo->P3c4, 0x05, 0x86);
if (HwDeviceExtension->jChipType < XG20) /* kuku 2004/06/25 1.Openkey */ if (HwDeviceExtension->jChipType < XG20)
XGI_UnLockCRT2(HwDeviceExtension, pVBInfo); XGI_UnLockCRT2(HwDeviceExtension, pVBInfo);
XGI_SearchModeID(ModeNo, &ModeIdIndex, pVBInfo); XGI_SearchModeID(ModeNo, &ModeIdIndex, pVBInfo);
if (HwDeviceExtension->jChipType < XG20) { /* kuku 2004/06/25 */ if (HwDeviceExtension->jChipType < XG20) {
XGI_GetVBInfo(ModeNo, ModeIdIndex, HwDeviceExtension, pVBInfo); XGI_GetVBInfo(ModeNo, ModeIdIndex, HwDeviceExtension, pVBInfo);
XGI_GetTVInfo(ModeNo, ModeIdIndex, pVBInfo); XGI_GetTVInfo(ModeNo, ModeIdIndex, pVBInfo);
XGI_GetLCDInfo(ModeNo, ModeIdIndex, pVBInfo); XGI_GetLCDInfo(ModeNo, ModeIdIndex, pVBInfo);
...@@ -6779,7 +6775,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -6779,7 +6775,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
XGI_UpdateModeInfo(HwDeviceExtension, pVBInfo); XGI_UpdateModeInfo(HwDeviceExtension, pVBInfo);
if (HwDeviceExtension->jChipType < XG20) { /* kuku 2004/06/25 */ if (HwDeviceExtension->jChipType < XG20) {
XGI_LockCRT2(HwDeviceExtension, pVBInfo); XGI_LockCRT2(HwDeviceExtension, pVBInfo);
} }
......
...@@ -28,7 +28,6 @@ struct XGI_Ext2Struct { ...@@ -28,7 +28,6 @@ struct XGI_Ext2Struct {
unsigned char ModeID; unsigned char ModeID;
unsigned short XRes; unsigned short XRes;
unsigned short YRes; unsigned short YRes;
/* unsigned short ROM_OFFSET; */
}; };
struct XGI_ECLKDataStruct { struct XGI_ECLKDataStruct {
...@@ -167,7 +166,6 @@ struct vb_device_info { ...@@ -167,7 +166,6 @@ struct vb_device_info {
unsigned short LCDHRS, LCDVRS, LCDHDES, LCDVDES; unsigned short LCDHRS, LCDVRS, LCDHDES, LCDVDES;
unsigned short ModeType; unsigned short ModeType;
/* ,IF_DEF_FSTN; add for dstn */
unsigned short IF_DEF_LVDS, IF_DEF_TRUMPION, IF_DEF_DSTN; unsigned short IF_DEF_LVDS, IF_DEF_TRUMPION, IF_DEF_DSTN;
unsigned short IF_DEF_CRT2Monitor; unsigned short IF_DEF_CRT2Monitor;
unsigned short IF_DEF_LCDA, IF_DEF_YPbPr; unsigned short IF_DEF_LCDA, IF_DEF_YPbPr;
...@@ -225,7 +223,6 @@ struct vb_device_info { ...@@ -225,7 +223,6 @@ struct vb_device_info {
struct SiS_StandTable_S *StandTable; struct SiS_StandTable_S *StandTable;
struct XGI_ExtStruct *EModeIDTable; struct XGI_ExtStruct *EModeIDTable;
struct XGI_Ext2Struct *RefIndex; struct XGI_Ext2Struct *RefIndex;
/* XGINew_CRT1TableStruct *CRT1Table; */
struct XGI_CRT1TableStruct *XGINEWUB_CRT1Table; struct XGI_CRT1TableStruct *XGINEWUB_CRT1Table;
struct SiS_VCLKData *VCLKData; struct SiS_VCLKData *VCLKData;
struct SiS_VBVCLKData *VBVCLKData; struct SiS_VBVCLKData *VBVCLKData;
......
#ifndef _VB_TABLE_ #ifndef _VB_TABLE_
#define _VB_TABLE_ #define _VB_TABLE_
/* yilin modify for xgi20 */
static struct SiS_MCLKData XGI340New_MCLKData[] = { static struct SiS_MCLKData XGI340New_MCLKData[] = {
{0x16, 0x01, 0x01, 166}, {0x16, 0x01, 0x01, 166},
{0x19, 0x02, 0x01, 124}, {0x19, 0x02, 0x01, 124},
...@@ -23,7 +22,6 @@ static struct SiS_MCLKData XGI27New_MCLKData[] = { ...@@ -23,7 +22,6 @@ static struct SiS_MCLKData XGI27New_MCLKData[] = {
{0x5c, 0x23, 0x01, 166} {0x5c, 0x23, 0x01, 166}
}; };
/* yilin modify for xgi20 */
static struct XGI_ECLKDataStruct XGI340_ECLKData[] = { static struct XGI_ECLKDataStruct XGI340_ECLKData[] = {
{0x5c, 0x23, 0x01, 166}, {0x5c, 0x23, 0x01, 166},
{0x55, 0x84, 0x01, 123}, {0x55, 0x84, 0x01, 123},
...@@ -424,13 +422,9 @@ static struct SiS_LCDData XGI_StLCD1024x768Data[] = { ...@@ -424,13 +422,9 @@ static struct SiS_LCDData XGI_StLCD1024x768Data[] = {
}; };
static struct SiS_LCDData XGI_ExtLCD1024x768Data[] = { static struct SiS_LCDData XGI_ExtLCD1024x768Data[] = {
/* { 12, 5, 896, 512,1344, 806}, // alan 09/12/2003 */
{42, 25, 1536, 419, 1344, 806}, {42, 25, 1536, 419, 1344, 806},
/* { 12, 5, 896, 510,1344, 806}, // alan 09/12/2003 */
{48, 25, 1536, 369, 1344, 806}, {48, 25, 1536, 369, 1344, 806},
/* { 32, 15,1008, 505,1344, 806}, // alan 09/12/2003 */
{42, 25, 1536, 419, 1344, 806}, {42, 25, 1536, 419, 1344, 806},
/* { 32, 15,1008, 514,1344, 806}, // alan 09/12/2003 */
{48, 25, 1536, 369, 1344, 806}, {48, 25, 1536, 369, 1344, 806},
{12, 5, 896, 500, 1344, 806}, {12, 5, 896, 500, 1344, 806},
{42, 25, 1024, 625, 1344, 806}, {42, 25, 1024, 625, 1344, 806},
...@@ -504,14 +498,10 @@ static struct SiS_LCDData xgifb_lcd_1400x1050[] = { ...@@ -504,14 +498,10 @@ static struct SiS_LCDData xgifb_lcd_1400x1050[] = {
}; };
static struct SiS_LCDData XGI_ExtLCD1600x1200Data[] = { static struct SiS_LCDData XGI_ExtLCD1600x1200Data[] = {
{4, 1, 1620, 420, 2160, 1250}, /* { 3,1,2160,425,2160,1250 }, {4, 1, 1620, 420, 2160, 1250}, /* 00 (320x200,320x400,
// 00 (320x200,320x400, 640x200,640x400)*/
// 640x200,640x400)
// // alan 10/14/2003 */
{27, 7, 1920, 375, 2160, 1250}, /* 01 (320x350,640x350) */ {27, 7, 1920, 375, 2160, 1250}, /* 01 (320x350,640x350) */
{4, 1, 1620, 420, 2160, 1250}, /* { 3,1,2160,425,2160,1250 }, {4, 1, 1620, 420, 2160, 1250}, /* 02 (360x400,720x400)*/
// 02 (360x400,720x400)
// // alan 10/14/2003 */
{27, 7, 1920, 375, 2160, 1250}, /* 03 (720x350) */ {27, 7, 1920, 375, 2160, 1250}, /* 03 (720x350) */
{27, 4, 800, 500, 2160, 1250}, /* 04 (640x480x60Hz) */ {27, 4, 800, 500, 2160, 1250}, /* 04 (640x480x60Hz) */
{4, 1, 1080, 625, 2160, 1250}, /* 05 (800x600x60Hz) */ {4, 1, 1080, 625, 2160, 1250}, /* 05 (800x600x60Hz) */
...@@ -615,8 +605,7 @@ static struct SiS_LCDData XGI_NoScalingDatax75[] = { ...@@ -615,8 +605,7 @@ static struct SiS_LCDData XGI_NoScalingDatax75[] = {
{1, 1, 1056, 625, 1056, 625}, /* ; 05 (800x600x75Hz) */ {1, 1, 1056, 625, 1056, 625}, /* ; 05 (800x600x75Hz) */
{1, 1, 1312, 800, 1312, 800}, /* ; 06 (1024x768x75Hz) */ {1, 1, 1312, 800, 1312, 800}, /* ; 06 (1024x768x75Hz) */
{1, 1, 1688, 1066, 1688, 1066}, /* ; 07 (1280x1024x75Hz) */ {1, 1, 1688, 1066, 1688, 1066}, /* ; 07 (1280x1024x75Hz) */
{1, 1, 1688, 1066, 1688, 1066}, /* ; 08 (1400x1050x75Hz) {1, 1, 1688, 1066, 1688, 1066}, /* ; 08 (1400x1050x75Hz)*/
;;[ycchen] 12/19/02 */
{1, 1, 2160, 1250, 2160, 1250}, /* ; 09 (1600x1200x75Hz) */ {1, 1, 2160, 1250, 2160, 1250}, /* ; 09 (1600x1200x75Hz) */
{1, 1, 1688, 806, 1688, 806} /* ; 0A (1280x768x75Hz) */ {1, 1, 1688, 806, 1688, 806} /* ; 0A (1280x768x75Hz) */
}; };
...@@ -823,8 +812,7 @@ static struct XGI330_LCDDataDesStruct2 XGI_NoScalingDesData[] = { ...@@ -823,8 +812,7 @@ static struct XGI330_LCDDataDesStruct2 XGI_NoScalingDesData[] = {
{9, 849, 627, 600, 128, 4}, /* 05 (800x600x60Hz) */ {9, 849, 627, 600, 128, 4}, /* 05 (800x600x60Hz) */
{9, 1057, 805, 770, 0136, 6}, /* 06 (1024x768x60Hz) */ {9, 1057, 805, 770, 0136, 6}, /* 06 (1024x768x60Hz) */
{9, 1337, 0, 1025, 112, 3}, /* 07 (1280x1024x60Hz) */ {9, 1337, 0, 1025, 112, 3}, /* 07 (1280x1024x60Hz) */
{9, 1457, 0, 1051, 112, 3}, /* 08 (1400x1050x60Hz) }, {9, 1457, 0, 1051, 112, 3}, /* 08 (1400x1050x60Hz)*/
//;[ycchen] 12/19/02 */
{9, 1673, 0, 1201, 192, 3}, /* 09 (1600x1200x60Hz) */ {9, 1673, 0, 1201, 192, 3}, /* 09 (1600x1200x60Hz) */
{9, 1337, 0, 771, 112, 6} /* 0A (1280x768x60Hz) */ {9, 1337, 0, 771, 112, 6} /* 0A (1280x768x60Hz) */
}; };
...@@ -910,8 +898,7 @@ static struct XGI330_LCDDataDesStruct2 XGI_NoScalingDesDatax75[] = { ...@@ -910,8 +898,7 @@ static struct XGI330_LCDDataDesStruct2 XGI_NoScalingDesDatax75[] = {
{9, 825, 0, 601, 80, 3}, /* ; 05 (800x600x75Hz) */ {9, 825, 0, 601, 80, 3}, /* ; 05 (800x600x75Hz) */
{9, 1049, 0, 769, 96, 3}, /* ; 06 (1024x768x75Hz) */ {9, 1049, 0, 769, 96, 3}, /* ; 06 (1024x768x75Hz) */
{9, 1305, 0, 1025, 144, 3}, /* ; 07 (1280x1024x75Hz) */ {9, 1305, 0, 1025, 144, 3}, /* ; 07 (1280x1024x75Hz) */
{9, 1457, 0, 1051, 112, 3}, /* ; 08 (1400x1050x60Hz) {9, 1457, 0, 1051, 112, 3}, /* ; 08 (1400x1050x60Hz)*/
;;[ycchen] 12/19/02 */
{9, 1673, 0, 1201, 192, 3}, /* ; 09 (1600x1200x75Hz) */ {9, 1673, 0, 1201, 192, 3}, /* ; 09 (1600x1200x75Hz) */
{9, 1337, 0, 771, 112, 6} /* ; 0A (1280x768x60Hz) */ {9, 1337, 0, 771, 112, 6} /* ; 0A (1280x768x60Hz) */
}; };
...@@ -1308,7 +1295,7 @@ static struct SiS_LVDSData XGI_LVDSNoScalingData[] = { ...@@ -1308,7 +1295,7 @@ static struct SiS_LVDSData XGI_LVDSNoScalingData[] = {
{1056, 628, 1056, 628}, /* 05 (800x600x60Hz) */ {1056, 628, 1056, 628}, /* 05 (800x600x60Hz) */
{1344, 806, 1344, 806}, /* 06 (1024x768x60Hz) */ {1344, 806, 1344, 806}, /* 06 (1024x768x60Hz) */
{1688, 1066, 1688, 1066}, /* 07 (1280x1024x60Hz) */ {1688, 1066, 1688, 1066}, /* 07 (1280x1024x60Hz) */
{1688, 1066, 1688, 1066}, /* 08 (1400x1050x60Hz) ;;[ycchen] 12/19/02 */ {1688, 1066, 1688, 1066}, /* 08 (1400x1050x60Hz) */
{2160, 1250, 2160, 1250}, /* 09 (1600x1200x60Hz) */ {2160, 1250, 2160, 1250}, /* 09 (1600x1200x60Hz) */
{1688, 806, 1688, 806} /* 0A (1280x768x60Hz) */ {1688, 806, 1688, 806} /* 0A (1280x768x60Hz) */
}; };
...@@ -1469,8 +1456,7 @@ static struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesData[] = { ...@@ -1469,8 +1456,7 @@ static struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesData[] = {
{0, 840, 627, 600, 128, 4}, /* 05 (800x600x60Hz) */ {0, 840, 627, 600, 128, 4}, /* 05 (800x600x60Hz) */
{0, 1048, 805, 770, 136, 6}, /* 06 (1024x768x60Hz) */ {0, 1048, 805, 770, 136, 6}, /* 06 (1024x768x60Hz) */
{0, 1328, 0, 1025, 112, 3}, /* 07 (1280x1024x60Hz) */ {0, 1328, 0, 1025, 112, 3}, /* 07 (1280x1024x60Hz) */
{0, 1438, 0, 1051, 112, 3}, /* 08 (1400x1050x60Hz) {0, 1438, 0, 1051, 112, 3}, /* 08 (1400x1050x60Hz)*/
;;[ycchen] 12/19/02 */
{0, 1664, 0, 1201, 192, 3}, /* 09 (1600x1200x60Hz) */ {0, 1664, 0, 1201, 192, 3}, /* 09 (1600x1200x60Hz) */
{0, 1328, 0, 0771, 112, 6} /* 0A (1280x768x60Hz) */ {0, 1328, 0, 0771, 112, 6} /* 0A (1280x768x60Hz) */
}; };
...@@ -1518,7 +1504,7 @@ static struct SiS_LVDSData XGI_LVDS1280x1024Des_1x75[] = { ...@@ -1518,7 +1504,7 @@ static struct SiS_LVDSData XGI_LVDS1280x1024Des_1x75[] = {
}; };
/* The Display setting for DE Mode Panel */ /* The Display setting for DE Mode Panel */
/* [ycchen] 02/18/03 Set DE as default */ /* Set DE as default */
static struct SiS_LVDSData XGI_LVDS1280x1024Des_2x75[] = { static struct SiS_LVDSData XGI_LVDS1280x1024Des_2x75[] = {
{1368, 976, 752, 711}, /* ; 00 (320x200,320x400,640x200,640x400) */ {1368, 976, 752, 711}, /* ; 00 (320x200,320x400,640x200,640x400) */
{1368, 976, 729, 688}, /* ; 01 (320x350,640x350) */ {1368, 976, 729, 688}, /* ; 01 (320x350,640x350) */
...@@ -1541,8 +1527,7 @@ static struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesDatax75[] = { ...@@ -1541,8 +1527,7 @@ static struct XGI330_LCDDataDesStruct2 XGI_LVDSNoScalingDesDatax75[] = {
{0, 816, 0, 601, 80, 3}, /* ; 05 (800x600x75Hz) */ {0, 816, 0, 601, 80, 3}, /* ; 05 (800x600x75Hz) */
{0, 1040, 0, 769, 96, 3}, /* ; 06 (1024x768x75Hz) */ {0, 1040, 0, 769, 96, 3}, /* ; 06 (1024x768x75Hz) */
{0, 1296, 0, 1025, 144, 3}, /* ; 07 (1280x1024x75Hz) */ {0, 1296, 0, 1025, 144, 3}, /* ; 07 (1280x1024x75Hz) */
{0, 1448, 0, 1051, 112, 3}, /* ; 08 (1400x1050x75Hz) {0, 1448, 0, 1051, 112, 3}, /* ; 08 (1400x1050x75Hz) */
;;[ycchen] 12/19/02 */
{0, 1664, 0, 1201, 192, 3}, /* ; 09 (1600x1200x75Hz) */ {0, 1664, 0, 1201, 192, 3}, /* ; 09 (1600x1200x75Hz) */
{0, 1328, 0, 771, 112, 6} /* ; 0A (1280x768x75Hz) */ {0, 1328, 0, 771, 112, 6} /* ; 0A (1280x768x75Hz) */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment