for (i = 0; i < 0x4f; i++) {
reg = xgifb_reg_get(XGISR, i);
- printk("\no 3c4 %x", i);
- printk("\ni 3c5 => %x", reg);
+ pr_debug("\no 3c4 %x", i);
+ pr_debug("\ni 3c5 => %x", reg);
}
for (i = 0; i < 0xF0; i++) {
reg = xgifb_reg_get(XGICR, i);
- printk("\no 3d4 %x", i);
- printk("\ni 3d5 => %x", reg);
+ pr_debug("\no 3d4 %x", i);
+ pr_debug("\ni 3d5 => %x", reg);
}
/*
xgifb_reg_set(XGIPART1,0x2F,1);
for (i=1; i < 0x50; i++) {
reg = xgifb_reg_get(XGIPART1, i);
- printk("\no d004 %x", i);
- printk("\ni d005 => %x", reg);
+ pr_debug("\no d004 %x", i);
+ pr_debug("\ni d005 => %x", reg);
}
for (i=0; i < 0x50; i++) {
reg = xgifb_reg_get(XGIPART2, i);
- printk("\no d010 %x", i);
- printk("\ni d011 => %x", reg);
+ pr_debug("\no d010 %x", i);
+ pr_debug("\ni d011 => %x", reg);
}
for (i=0; i < 0x50; i++) {
reg = xgifb_reg_get(XGIPART3, i);
- printk("\no d012 %x",i);
- printk("\ni d013 => %x",reg);
+ pr_debug("\no d012 %x",i);
+ pr_debug("\ni d013 => %x",reg);
}
for (i=0; i < 0x50; i++) {
reg = xgifb_reg_get(XGIPART4, i);
- printk("\no d014 %x",i);
- printk("\ni d015 => %x",reg);
+ pr_debug("\no d014 %x",i);
+ pr_debug("\ni d015 => %x",reg);
}
*/
}
int old_mode;
/* unsigned char reg, reg1; */
- /* printk(KERN_DEBUG "XGIfb:var->yres=%d, var->upper_margin=%d, var->lower_margin=%d, var->vsync_len=%d\n", var->yres, var->upper_margin, var->lower_margin, var->vsync_len); */
-
info->var.xres_virtual = var->xres_virtual;
info->var.yres_virtual = var->yres_virtual;
info->var.bits_per_pixel = var->bits_per_pixel;
struct xgifb_video_info *xgifb_info = info->par;
unsigned int base;
- /* printk("Inside pan_var"); */
-
base = var->yoffset * info->var.xres_virtual + var->xoffset;
/* calculate base bpp dep. */
0x7F,
((base >> 24) & 0x01) << 7);
}
- /* printk("End of pan_var"); */
return 0;
}
{
int err;
- /* printk("XGIfb: inside set_par\n"); */
err = XGIfb_do_set_var(&info->var, 1, info);
if (err)
return err;
XGIfb_get_fix(&info->fix, -1, info);
- /* printk("XGIfb: end of set_par\n"); */
return 0;
}
{
int err;
- /* printk("\nInside pan_display:\n"); */
-
if (var->xoffset > (info->var.xres_virtual - info->var.xres))
return -EINVAL;
if (var->yoffset > (info->var.yres_virtual - info->var.yres))
else
info->var.vmode &= ~FB_VMODE_YWRAP;
- /* printk("End of pan_display\n"); */
return 0;
}
/* else if (reg >= 0xB0) {
hw_info->ujVBChipID = VB_CHIP_301B;
reg1 = xgifb_reg_get(XGIPART4, 0x23);
- printk("XGIfb: XGI301B bridge detected\n");
+ pr_debug("XGIfb: XGI301B bridge detected\n");
} */
else {
hw_info->ujVBChipID = VB_CHIP_301;
/* Newdebugcode(0x99); */
if (pVBInfo->FBAddr == NULL) {
- printk("\n pVBInfo->FBAddr == 0 ");
+ pr_debug("pVBInfo->FBAddr == 0\n");
return 0;
}
- printk("1");
if (pVBInfo->BaseAddr == 0) {
- printk("\npVBInfo->BaseAddr == 0 ");
+ pr_debug("pVBInfo->BaseAddr == 0\n");
return 0;
}
- printk("2");
outb(0x67, (pVBInfo->BaseAddr + 0x12)); /* 3c2 <- 67 ,ynlai */
pVBInfo->ISXPDOS = 0;
- printk("3");
-
- printk("4");
/* VBIOSVersion[4] = 0x0; */
pVBInfo->Part3Port = pVBInfo->BaseAddr + SIS_CRT2_PORT_12;
pVBInfo->Part4Port = pVBInfo->BaseAddr + SIS_CRT2_PORT_14;
pVBInfo->Part5Port = pVBInfo->BaseAddr + SIS_CRT2_PORT_14 + 2;
- printk("5");
if (HwDeviceExtension->jChipType < XG20) /* kuku 2004/06/25 */
/* Run XGI_GetVBType before InitTo330Pointer */
/* 1.Openkey */
xgifb_reg_set(pVBInfo->P3c4, 0x05, 0x86);
- printk("6");
/* GetXG21Sense (GPIO) */
if (HwDeviceExtension->jChipType == XG21)
if (HwDeviceExtension->jChipType == XG27)
XGINew_GetXG27Sense(HwDeviceExtension, pVBInfo);
- printk("7");
-
/* 2.Reset Extended register */
for (i = 0x06; i < 0x20; i++)
/* for(i = 0x06; i <= 0x27; i++) */
/* xgifb_reg_set(pVBInfo->P3c4, i, 0); */
- printk("8");
-
for (i = 0x31; i <= 0x3B; i++)
xgifb_reg_set(pVBInfo->P3c4, i, 0);
- printk("9");
/* [Hsuan] 2004/08/20 Auto over driver for XG42 */
if (HwDeviceExtension->jChipType == XG42)
for (i = 0x79; i <= 0x7C; i++)
xgifb_reg_set(pVBInfo->P3d4, i, 0); /* shampoo 0208 */
- printk("10");
-
if (HwDeviceExtension->jChipType >= XG20)
xgifb_reg_set(pVBInfo->P3d4, 0x97, pVBInfo->XGINew_CR97);
pVBInfo->ram_type = XGINew_GetXG20DRAMType(HwDeviceExtension, pVBInfo);
*/
- printk("11");
-
/* 4.SetDefExt1Regs begin */
xgifb_reg_set(pVBInfo->P3c4, 0x07, XGI330_SR07);
if (HwDeviceExtension->jChipType == XG27) {
/* SR11 = 0x0F; */
/* xgifb_reg_set(pVBInfo->P3c4, 0x11, SR11); */
- printk("12");
-
if (HwDeviceExtension->jChipType < XG20) { /* kuku 2004/06/25 */
u32 Temp;
}
*/
- printk("13");
-
/* Set AGP customize registers (in SetDefAGPRegs) Start */
for (i = 0x47; i <= 0x4C; i++)
xgifb_reg_set(pVBInfo->P3d4,
if (Temp == 1)
xgifb_reg_set(pVBInfo->P3d4, 0x48, 0x20); /* CR48 */
- printk("14");
} /* != XG20 */
/* Set PCI */
xgifb_reg_set(pVBInfo->P3c4, 0x23, XGI330_SR23);
xgifb_reg_set(pVBInfo->P3c4, 0x24, XGI330_SR24);
xgifb_reg_set(pVBInfo->P3c4, 0x25, XGI330_SR25);
- printk("15");
if (HwDeviceExtension->jChipType < XG20) { /* kuku 2004/06/25 */
/* Set VB */
xgifb_reg_set(pVBInfo->Part1Port,
0x02, XGI330_CRT2Data_1_2);
- printk("16");
-
xgifb_reg_set(pVBInfo->Part1Port, 0x2E, 0x08); /* use VB */
} /* != XG20 */
xgifb_reg_set(pVBInfo->P3c4, 0x32, XGI330_SR32);
}
xgifb_reg_set(pVBInfo->P3c4, 0x33, XGI330_SR33);
- printk("17");
/*
SetPowerConsume (HwDeviceExtension, pVBInfo->P3c4); */
XGI_LockCRT2(HwDeviceExtension, pVBInfo);
}
} /* != XG20 */
- printk("18");
-
- printk("181");
-
- printk("182");
XGI_SenseCRT1(pVBInfo);
- printk("183");
/* XGINew_DetectMonitor(HwDeviceExtension); */
if (HwDeviceExtension->jChipType == XG21) {
- printk("186");
xgifb_reg_and_or(pVBInfo->P3d4,
0x32,
Monitor1Sense); /* Z9 default has CRT */
temp = GetXG21FPBits(pVBInfo);
xgifb_reg_and_or(pVBInfo->P3d4, 0x37, ~0x01, temp);
- printk("187");
}
if (HwDeviceExtension->jChipType == XG27) {
temp = GetXG27FPBits(pVBInfo);
xgifb_reg_and_or(pVBInfo->P3d4, 0x37, ~0x03, temp);
}
- printk("19");
pVBInfo->ram_type = XGINew_GetXG20DRAMType(HwDeviceExtension, pVBInfo);
pVBInfo->P3d4,
pVBInfo);
- printk("20");
XGINew_SetDRAMSize_340(xgifb_info, HwDeviceExtension, pVBInfo);
- printk("21");
-
- printk("22");
/* SetDefExt2Regs begin */
/*
xgifb_reg_set(pVBInfo->P3c4, 0x21, pVBInfo->SR21);
- printk("23");
-
XGINew_ChkSenseStatus(HwDeviceExtension, pVBInfo);
XGINew_SetModeScratch(HwDeviceExtension, pVBInfo);
- printk("24");
-
xgifb_reg_set(pVBInfo->P3d4, 0x8c, 0x87);
xgifb_reg_set(pVBInfo->P3c4, 0x14, 0x31);
- printk("25");
return 1;
} /* end of init */