xgifb_reg_set(pVBInfo->Part1Port, 0x00, 0x00);
                /* chk if BCLK>=100MHz */
                temp1 = xgifb_reg_get(pVBInfo->P3d4, 0x7B);
-               temp = (unsigned char) ((temp1 >> 4) & 0x0F);
 
                xgifb_reg_set(pVBInfo->Part1Port,
                              0x02, XGI330_CRT2Data_1_2);
 
 
        xgifb_reg_and_or(pVBInfo->P3d4, 0x07, ~0x42, tempax);
        data = xgifb_reg_get(pVBInfo->P3d4, 0x07);
-       data &= 0xFF;
        tempax = 0;
 
        if (tempbx & 0x04)
        xgifb_reg_and_or(pVBInfo->Part1Port, 0x1a, 0x07,
                                tempax);
 
-       tempcx = pVBInfo->VGAVT;
        tempbx = pVBInfo->VDE;
        tempax = pVBInfo->VGAVDE;
-       tempcx -= tempax;
 
        temp = tempax; /* 0430 ylshieh */
        temp1 = (temp << 18) / tempbx;
                                        tempbx = 775;
                                else if (pVBInfo->VGAVDE == 600)
                                        tempbx = 775;
-                               else
-                                       tempbx = 768;
-                       } else
-                               tempbx = 768;
+                       }
                } else if (pVBInfo->LCDResInfo == Panel_1024x768x75) {
                        tempax = 1024;
                        tempbx = 768;
        temp |= ((tempcx & 0xFF00) >> 8);
        xgifb_reg_set(pVBInfo->Part1Port, 0x12, temp);
 
-       tempax = pVBInfo->VGAVDE;
-       tempbx = pVBInfo->VGAVDE;
-       tempcx = pVBInfo->VGAVT;
        /* BTVGA2VRS 0x10,0x11 */
        tempbx = (pVBInfo->VGAVT + pVBInfo->VGAVDE) >> 1;
        /* BTVGA2VRE 0x11 */
                }
        }
        tempbx--;
-       temp = tempbx & 0x00FF;
        tempbx--;
        temp = tempbx & 0x00FF;
        /* 0x10 vertical Blank Start */
        temp &= 0x80;
        xgifb_reg_and_or(pVBInfo->Part2Port, 0x0A, 0xFF, temp);
 
-       if (pVBInfo->VBInfo & SetCRT2ToHiVision)
-               tempax = 950;
-
        if (pVBInfo->TVInfo & TVSetPAL)
                tempax = 520;
        else
 
        tempebx = pVBInfo->VDE;
 
-       if (tempcx & SetCRT2ToHiVision) {
-               if (!(temp & 0xE000))
-                       tempbx = tempbx >> 1;
-       }
-
        tempcx = pVBInfo->RVBHRS;
        temp = tempcx & 0x00FF;
        xgifb_reg_set(pVBInfo->Part4Port, 0x18, temp);